POST
/
payment-methods
/
{payment_method_id}
/
payment-service-tokens

This endpoint requires the payment-methods.write scope.

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

payment_method_id
string
required

The ID of the payment method.

Body

application/json
security_code
string | null

The 3 or 4 digit security code often found on the card. This often referred to as the CVV or CVD.

The security code can only be set if the stored payment method represents a card.

payment_service_id
string
required

The ID of the payment service.

redirect_url
string
required

The redirect URL to redirect a buyer to after they have authorized their payment method. This only applies to payment methods that require buyer approval.

Response

201 - application/json
type
enum<string>

The type of this resource.

Available options:
payment-service-token
id
string

The unique ID of the token.

payment_method_id
string

The unique ID of the payment method.

payment_service_id
string

The unique ID of the payment service.

status
enum<string>

The state of the token.

  • processing - The payment method is still being stored.
  • buyer_approval_required - Storing the payment method requires the buyer to provide approval. Follow the approval_url for next steps.
  • succeeded - The payment method is approved and stored with all relevant payment services.
  • failed - Storing the payment method did not succeed.
Available options:
processing,
buyer_approval_required,
succeeded,
failed
approval_url
string | null

The optional URL that the buyer needs to be redirected to to further authorize their payment.

token
string

The token value.

created_at
string

The date and time when this token was first created in our system.

updated_at
string

The date and time when this token was last updated in our system.