Skip to content

Records a card the payment provider now holds.

POST
/v1/payment-methods
curl --request POST \
--url https://courierapi.itdlogisoft.co.uk/v1/payment-methods \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "provider_ref": "example", "make_default": false }'
Media typeapplication/json

Record a card the provider now holds.

In the sandbox, provider_ref is pm_sandbox_ followed by one of the designated test card numbers — that is how an integration chooses whether the card succeeds, declines, or is expired.

object
provider_ref
required
string
make_default
boolean

Created

Media typeapplication/json

A card on file.

Four digits, a brand and an expiry, which is the most of a card this platform ever holds. The number lives at the payment provider and reaches us at no point.

object
id
required
string
brand
required
string
last_four
required
string
expiry_month
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
expiry_year
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
status
required
string
is_default
required
boolean
attached_at
required
string format: date-time
dead_reason
required
null | string

Example generated

{
"id": "example",
"brand": "example",
"last_four": "example",
"expiry_month": 1,
"expiry_year": 1,
"status": "example",
"is_default": true,
"attached_at": "2026-04-15T12:00:00Z",
"dead_reason": "example"
}

Unprocessable Entity

Media typeapplication/json

The shape of every refusal from this API.

string ApiError.Code is stable and machine-readable; string ApiError.Message is for a human reading a log and may change without notice. Integrators are told to branch on the code.

object
code
required
string
message
required
string

Example generated

{
"code": "example",
"message": "example"
}