Skip to main content
POST
Attaches an existing payment method to an account OR creates a brand new payment method and attaches it to an account

Authorizations

Authorization
string
header
required

OAuth 2.0 Authentication

Path Parameters

id
string
required

The SLM Account ID.

Body

application/json

A request body to link an existing payment method to an account OR create a new payment method and link it to an account. When linking an existing payment method to an account:

  1. id - must be an id of an existing payment method to be linked to the account.
  2. Payment method object (merchantAcceptedPayment OR creditCard OR carrierBilling OR debitCard OR externalBilling based on the payment method type) - must be provided. When creating a new payment method and linking it to an account:
  3. id - a random value that will be used as the ID of the new payment method.
  4. Payment method object (merchantAcceptedPayment OR creditCard OR carrierBilling OR debitCard OR externalBilling based on the payment method type) - must NOT be provided.
id
string
required

Id of payment method. If attaching an existing payment method to an account - must be an ID of an existing payment method; If creating a new payment method to be added to an account - a random value that will be used as the ID of the new payment method.

vid
string
primary
boolean

When creating/attaching a payment method without providing this attribute:

  • if there are no existing payment methods - it will become primary;
  • if at least one payment method already exists - it will become non-primary.
active
boolean
default:true

Indicates if the payment method is active. Must provide 'type' parameter if active=false.

type
enum<string>

Type of payment method. Must be provided if attaching/creating an inactive payment method.

Available options:
CarrierBilling,
ExternalBilling,
MerchantAcceptedPayment,
CreditCard,
DebitCard
merchantAcceptedPayment
object
creditCard
object
carrierBilling
object

This object defines Telco carrier billing details.

debitCard
object

This object defines Direct Debit details (vary by country/system)

externalBilling
object
currency
string
policy
object
metadata
object

A set of key/value pairs that you can attach to an object. Useful for storing additional information.

Response

OK

id
string
name
string
email
string
metadata
object

A set of key/value pairs that you can attach to an object. Useful for storing additional information.

paymentMethods
object[]