Save card

This API is used to save to the customer a card tokenized with the iframe (after Card session).

It returns the saved card. Its id is the payment_method_id used by Transfer in.

Note: No amount is charged and no address verification (AVS) is run. billing_address is only stored.

URL

{{interface_url}}/{{version}}/customers/{{customer_id}}/payment-methods/cards

Method

POST

Headers

Authorization: Bearer {access_token} (or Api-Key)

Request Parameters

FieldTypeRequiredDescription
tokenStringYesCard token returned by the iframe (card_data.token). Max 45.
last4StringYes4 digits.
exp_monthIntegerYes1-12.
exp_yearIntegerYes2 digits (0-99).
card_typeStringNoBrand from the iframe (e.g. VISA). Max 20.
card_holderStringNoMax 45.
transaction_noStringNoIframe transaction_id. Max 45.
defaultBooleanNoMake it the default method.
billing_address.line1 / line2StringNoMax 100.
billing_address.city / stateStringNoMax 45. state as a code (e.g. TX).
billing_address.zipcodeStringNoMax 20.
location_idIntegerConditionalLocation to use. Required when the token covers more than one location (corporate / sub corporate); with a location token it is taken from the token.

URL Parameters

ParameterRequired/OptionalTypeDescription
customer_idRequiredIntegerOur customer ID (id returned by Create customer).

Example Request (cURL)

curl --location --request POST '{{interface_url}}/{{version}}/customers/{{customer_id}}/payment-methods/cards' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{access_token}}' \
--data '{
  "location_id": 279685,
  "token": "GRYfiyggFSBV0670",
  "card_type": "VISA",
  "last4": "4242",
  "exp_month": 12,
  "exp_year": 28,
  "card_holder": "Ana Garcia",
  "default": true,
  "billing_address": {
    "line1": "100 Main St",
    "city": "Austin",
    "state": "TX",
    "zipcode": "78701"
  }
}'

Example Response (JSON) — 201

{
  "id": 90311,
  "type": "card",
  "location_id": 279685,
  "holder": "Ana Garcia",
  "default": true,
  "created_at": "2026-11-05T18:16:18Z",
  "brand": "visa",
  "last4": "4242",
  "exp_month": 12,
  "exp_year": 28,
  "billing_address": {
    "line1": "100 Main St",
    "line2": null,
    "city": "Austin",
    "state": "TX",
    "zipcode": "78701",
    "country_iso": "US"
  }
}

Error Responses

Format: { "error": { "code", "name", "message", "details" } }

StatusErrorWhen
400missing_required_parametersMissing or invalid field (see error.details).
404customer_not_foundThe customer is not linked to that location.
502payment_gateway_unexpected_responseThe card could not be saved. Retry.

Path Params
string
required
string
required
Body Params
Response

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json