Creates a payment instrument. If the payment card, bank account, or alternative payment instrument already exists it is updated.
Creates a payment instrument. If the payment card, bank account, or alternative payment instrument already exists it is updated.
PaymentInstrument resource.
customerId required | string (CustomerId) <= 50 characters ID of the customer resource. |
token required | string ID of the payment token. |
customFields | object (ResourceCustomFields) Use custom fields to extend a resource scheme to include custom data that is not provided as a common field. For more information, see Custom fields. |
useAsBackup | boolean (UseAsBackup) Specifies if this payment instrument can be used as a backup for invoice payment retries. |
{ "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF", "token": "string", "customFields": { "foo": "bar" }, "useAsBackup": false }
201
Payment instrument created.
303
Payment instrument updated.
401
Unauthorized access. Invalid credentials used.
403
Access forbidden.
422
Invalid data sent.
{ "id": "inst_0YVB8KPKNXCBR9EDX7JHSED75N", "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF", "method": "payment-card", "status": "active", "fingerprint": "string", "bin": "string", "last4": "string", "expYear": 0, "expMonth": 0, "brand": "Visa", "bankCountry": "string", "bankName": "string", "billingAddress": { "firstName": "Benjamin", "lastName": "Franklin", "organization": "Rebilly", "address": "36 Craven St", "address2": "string", "city": "Austin", "region": "Texas", "country": "GB", "postalCode": "WC2N 5NF", "phoneNumbers": [ { "label": "main", "value": "512-710-1640", "primary": true } ], "emails": [ { "label": "main", "value": "rebilly@example.com", "primary": true } ], "dob": "1980-04-01", "jobTitle": "CEO", "hash": "056ae6d97c788b9e98b049ebafd7b229bf852221" }, "useAsBackup": false, "billingPortalUrl": "string", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "customFields": { "foo": "bar" }, "stickyGatewayAccountId": "string", "expirationReminderTime": "2019-08-24T14:15:22Z", "expirationReminderNumber": 0, "referenceData": { "gatewayTransactionId": "GAT123" }, "digitalWallet": "Apple Pay", "riskMetadata": { "ipAddress": "93.92.91.90", "fingerprint": "pIUt3xbgX3l9g3YDiLbx", "httpHeaders": { "Content-Type": "application/json", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" }, "browserData": { "colorDepth": 24, "isJavaEnabled": true, "language": "en-US", "screenWidth": 1920, "screenHeight": 1080, "timeZoneOffset": 300 }, "extraData": { "kountFraudSessionId": "abcdefg12345abababab123456789012", "payPalMerchantSessionId": "dd65ratxc5qv15iph3vyoq7l6davuowa", "threatMetrixSessionId": "dd65ratxc5qv15iph3vyoq7l6davuowadd65ratxc5qv15iph3vyoq7l6davuowa" }, "isProxy": true, "isVpn": true, "isTor": true, "isHosting": true, "vpnServiceName": "string", "isp": "string", "country": "US", "region": "NY", "city": "New York", "latitude": 0, "longitude": 0, "postalCode": "string", "timeZone": "America/New_York", "accuracyRadius": 0, "distance": 0, "hasMismatchedBillingAddressCountry": true, "hasMismatchedBankCountry": true, "hasMismatchedTimeZone": true, "hasMismatchedHolderName": true, "hasFakeName": true, "isHighRiskCountry": true, "paymentInstrumentVelocity": 0, "declinedPaymentInstrumentVelocity": 0, "deviceVelocity": 0, "ipVelocity": 0, "emailVelocity": 0, "billingAddressVelocity": 0, "score": 0 }, "revision": 0, "_links": [ { "href": "string", "rel": "self" } ], "_embedded": { "authTransaction": { }, "customer": { } } }