Skip to content
Status

Create a payment method

POSThttps://app.shuttleglobal.com/c/api/instances/{instance_key}/payment_methods

POST
/payment_methods

Create a new payment method. This API supports two main use cases:

  1. Data import/copy (token import)
  2. Third-party UI integration (payment details capture and gateway tokenization)

For third-party UI integration or custom tokenization flows, please contact support as additional gateway-specific requirements may apply.

Media typeapplication/json
object
payment_method
required
object
object
account
required
One of:

Account ID or CRM key

address
object

Address fields. All fields are optional and any values are accepted to prevent interrupting payments due to address validation issues. Field behavior:

  1. When updating an address, the entire address object is replaced with the new values
  2. To clear/null out all address fields, set each field to an empty string Client applications can implement their own validation if needed.
object
country
string

Country code (any format accepted). Set to empty string to clear.

line1
string

First line of the address. Set to empty string to clear.

line2
string

Second line of the address. Set to empty string to clear.

line3
string

Third line of the address. Set to empty string to clear.

line4
string

City/Town. Set to empty string to clear.

line5
string

Postcode/ZIP. Set to empty string to clear.

line6
string

State/Region. Set to empty string to clear.

code
string

Your ID for this payment method

expiry
string

Expiry date in MM/YYYY format

gateway
string

Gateway this payment method is linked to

last4
string

Last 4+ digits of the payment method identifier

manual
boolean

Must be true for token import, false for third-party UI integration

name
string

Display name of the payment method

requires_cvc
boolean

Whether CVC is required for ecommerce/MOTO payments

status
string · enum

Initial status of the payment method

Allowed values: ACTIVE FAILING
token
string

Gateway token (format varies by gateway)

type
string

Payment method type (e.g., VISA, MASTERCARD, SEPA, ACH)

source
string · enum

Source of the payment method

Allowed values: ECOMMERCE MOTO POS
tags
string

CSV of tags/references

metadata
object

Custom key-value pairs

object
key
additional properties
any
bin
string

Card BIN number

card_number
string

Card number. Non-digits are stripped. Required unless a bank detail set, a wallet detail set or a token is sent.

card_expiry
string

Card expiry. Alias of expiry. Accepts MMYY, MM/YY, M/YY or MYY and is stored as a month.

card_cvc
string

Card security code. Passed to the gateway and never stored.

iban
string

IBAN. Alias sepa_iban. Makes the method SEPA.

account_holder_name
string

Name on the bank account. Aliases cardholder_name, sepa_account_holder_name, ach_account_holder_name.

account_type
string

Bank account type: checking, savings or businessChecking. Alias ach_account_type. Makes the method ACH.

routing_number
string

Bank routing number. Alias ach_routing_number.

account_number
string

Bank account number. Alias ach_account_number. Makes the method BACS when no other type applies.

contracts
Array<string>

Ids of the contracts this payment method is attached to once it is active.

Payment method created

Media typeapplication/json
object
payment_method
object
object
id
string

Unique identifier for the payment method

Pattern /^pm_[0-9]+_[0-9a-z]+$/
account
string

Account ID this payment method belongs to

address
object

Address fields. All fields are optional and any values are accepted to prevent interrupting payments due to address validation issues. Field behavior:

  1. When updating an address, the entire address object is replaced with the new values
  2. To clear/null out all address fields, set each field to an empty string Client applications can implement their own validation if needed.
object
country
string

Country code (any format accepted). Set to empty string to clear.

line1
string

First line of the address. Set to empty string to clear.

line2
string

Second line of the address. Set to empty string to clear.

line3
string

Third line of the address. Set to empty string to clear.

line4
string

City/Town. Set to empty string to clear.

line5
string

Postcode/ZIP. Set to empty string to clear.

line6
string

State/Region. Set to empty string to clear.

advanced_notice_hours
integer
e.g. 180

Number of hours this payment method requires between a payment being instructed and the funds settling at the bank. Returned by gateways for schemes that need lead time (e.g., BACS, SEPA, ACH, PAD, BECS). Absent / null for card and wallet methods.

When set, Shuttle schedules each charge and its payment attempt this many hours before the charge’s due date — the due date itself is unchanged, but the charge is generated and sent to the gateway earlier so the customer is debited on time. See the Scheduler guide for details.

archived
string · date-time

When the payment method was archived (deleted)

authorisation_url
string

Link for 3DS or equivalent process during creation

code
string

Your ID for this payment method

created
string · date-time

When the payment method was created

created_session
string

Session that created this payment method

expiry
string

Expiry date in MM/YYYY format

failing_reason
string

Reason this payment method is not working

failing_since
string · date-time

When this payment method stopped working

gateway
string

Gateway this payment method is linked to

gateway_group
string

Group identifier for gateways that support payment method sharing. When present, this payment method can be used across any gateway that shares the same gateway_group. This feature is only supported on specific gateway implementations.

gateway_status
string

Gateway’s status of the payment method

last4
string

Last 4+ digits of the payment method identifier

last_used
string · date-time

When this payment method was last used

mandate_id
string

ID of the legal mandate where applicable

mandate_link
string

Link to the legal mandate where applicable

mandate_reference
string

Customer-facing mandate reference number

mandate_text
string

Legal text of the mandate

name
string

Display name of the payment method

requires_cvc
boolean

Whether CVC is required for ecommerce/MOTO payments

source
string · enum

Where the payment method was captured

Allowed values: MOTO ECOMMERCE POS
status
string · enum

Current status of the payment method

Allowed values: ACTIVE FAILING FAILED ARCHIVE EXPIRED INACTIVE SINGLEUSE REQAUTH
sub_status
string

Free text substatus (e.g., mandate status for GOCARDLESS)

sub_status_reason
string

Description of the substatus

tags
string

CSV of tags/references

metadata
object

Custom key-value pairs

object
key
additional properties
any
bin
string

Card BIN number

card_holder_name
string

Name on the card

eci
string

Electronic Commerce Indicator value

network_token
boolean

Whether this payment method uses a network token

source_type
string

Source card type

token
string

Gateway token (only for ACTIVE and FAILING methods)

type
string

Payment method type (e.g., VISA, MASTERCARD, SEPA, ACH)

updated_session
string

Session that last updated this payment method

v
integer

Version of the record

Bad request

Media typeapplication/json

Every error has a code and a message. Some add more fields alongside them, with detail about the error.

object
code
string

The error code, for example VALIDATION_ERROR, INVALID, INVALID_REQUEST, UNAUTHORIZED, FORBIDDEN or NOT_FOUND. Program against this, not the message.

message
string

What went wrong, in words, for logs and support.

Authentication required

Media typeapplication/json

Every error has a code and a message. Some add more fields alongside them, with detail about the error.

object
code
string

The error code, for example VALIDATION_ERROR, INVALID, INVALID_REQUEST, UNAUTHORIZED, FORBIDDEN or NOT_FOUND. Program against this, not the message.

message
string

What went wrong, in words, for logs and support.

Example
{
"code": "UNAUTHORIZED",
"message": "Unauthorised"
}

Instance not found (only checked after successful authentication)

Media typeapplication/json

Every error has a code and a message. Some add more fields alongside them, with detail about the error.

object
code
string

The error code, for example VALIDATION_ERROR, INVALID, INVALID_REQUEST, UNAUTHORIZED, FORBIDDEN or NOT_FOUND. Program against this, not the message.

message
string

What went wrong, in words, for logs and support.

Internal server error

Media typeapplication/json
object
error
object
object
type
string
message
string

Was this page helpful?