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
$curl -X POST https://api.sandbox.primer.io/payment-instruments/string/default \
> -H "X-API-KEY: <apiKey>"
Response
1{
2 "paymentMethodType": "PAYMENT_CARD",
3 "paymentMethodData": {
4 "last4Digits": "string",
5 "expirationMonth": "string",
6 "expirationYear": "string",
7 "binData": {
8 "network": "AMEX",
9 "issuerCountryCode": "AW",
10 "issuerCurrencyCode": "AED",
11 "regionalRestriction": "DOMESTIC_USE_ONLY",
12 "accountNumberType": "PRIMARY_ACCOUNT_NUMBER",
13 "accountFundingType": "CREDIT",
14 "prepaidReloadableIndicator": "RELOADABLE",
15 "productUsageType": "CONSUMER",
16 "productCode": "string",
17 "productName": "string"
18 }
19 }
20}