Skip to main content
POST
/
payment-methods
Create a payment method
curl --request POST \
  --url https://api.nomos.energy/payment-methods \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "subscription": "sub_isf8fgx6zal5jepspk3b4juw",
  "type": "sepa_debit",
  "sepa_debit": {
    "iban": "DE68500105178297336485",
    "account_holder": "John Doe"
  }
}
'
{
  "object": "payment_method",
  "id": "pm_adc9utqqpcp7tx054l7vg56s2",
  "type": "sepa_debit",
  "sepa_debit": {
    "iban": "DE************6485",
    "account_holder": "John Doe"
  },
  "created_at": "2024-03-14T12:00:00Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The payment method to create

subscription
string
required

ID of the subscription to attach the new payment method to. The new payment method becomes the active mandate for this subscription.

Example:

"sub_isf8fgx6zal5jepspk3b4juw"

type
enum<string>
required

Type of payment method

Available options:
sepa_debit
Example:

"sepa_debit"

sepa_debit
object
required

Response

The created payment method

object
enum<string>
required

Type of the object, always 'payment_method'

Available options:
payment_method
id
string
required

Unique identifier for the payment method

Example:

"pm_adc9utqqpcp7tx054l7vg56s2"

type
enum<string>
required

Type of payment method - Currently only SEPA direct debit is supported

Available options:
sepa_debit
Example:

"sepa_debit"

sepa_debit
object
required
created_at
required

Timestamp when the payment method was created

Example:

"2024-03-14T12:00:00Z"