Skip to content
Status

Update a payment method

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

PUT
/payment_methods/{payment_method_id}

Update an existing payment method’s details.

payment_method_id
required
string

The payment method’s ID (pm_...), or its code.

Media typeapplication/json
object
payment_method
required
object
object
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

last4
string

Last 4+ digits of the payment method identifier

manual
boolean

Must be true as only manual updates are currently supported

name
string

Display name of the payment method

requires_cvc
boolean

Whether CVC is required for ecommerce/MOTO payments

token
string

Gateway token (format varies by gateway)

tags
string

CSV of tags/references

metadata
object

Custom key-value pairs

object
key
additional properties
any

Updated payment method

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"
}

Resource not found

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?