Payment Methods API

Update the default saved payment method

POST
Update a saved payment method to be the default stored payment method for a customer.

Path parameters

paymentMethodTokenstringRequired
Saved payment method token to set to default.

Response

This endpoint returns an object
createdAt
datetimeOptional
Creation date & time of the object (UTC)
deletedAt
datetimeOptional
Date & time when this object was revoked. (UTC)
deleted
booleanOptional
Whether or not this object has been revoked.
token
stringOptional
The vaulted payment method token.
tokenType
stringOptional
  • MULTI_USE a vaulted token that can be re-used with subsequent payments
analyticsId
stringOptional
Unique analytics identifier corresponding to a payment method
paymentMethodType
enumOptional
Payment method type associated with a token.
paymentMethodData
unionOptional
Payment method data
customerId
stringOptional
The ID representing the customer
description
stringOptional
A friendly description given by the user
default
booleanOptional
Whether or not this payment method is the default

Errors

POST
1curl -X POST https://api.primer.io/payment-instruments/payment-method-token/default \
2 -H "X-API-KEY: <apiKey>"
1{
2 "paymentMethodType": "PAYMENT_CARD"
3}