Payment options
Learn how to manage payment options.
Creating shopper payment options
Use the POST /v1/shoppers/me/payment-options
request to create payment options for a shopper. See Payment options query parameters for a description of the query parameters.
curl --location --request POST 'https://api.digitalriver.com/v1/shoppers/me/payment-options' \
--header 'authorization: bearer ***\
...
--data-raw '{
"paymentOption": {
"nickName": "DRBank",
"isDefault": "true",
"sourceId": "{{sourceId}}"
},
"shopper": {
"ipAddress": "{{ipAddress}}"
}
}
{
"uri": "https://api.digitalriver.com/v1/shoppers/me/payment-options/740865108",
"id": 740865108,
"nickName": "Default",
"isDefault": "true",
"type": "creditCard",
"sourceId": "{{sourceId}}",
"sourceClientSecret": "{{clientSecret}}",
"creditCard": {
"expirationYear": "2030",
"lastFourDigits": "0000",
"clientSecret": "{{clientSecret}}",
"expirationMonth": "08",
"fundingSource": "debit",
"brand": "Visa",
"reusable": "true"
}
}
See Retrieving sources and Payment options for more information.