Update payment instrument

Updates the values of a payment instrument with a specified ID.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

ID of the resource.

Request Body schema: application/json

PaymentInstrument resource.

One of:
token
string

ID of the payment token.

object

Customer's billing address. If this value is supplied it overrides the billing address that is supplied with the token.

firstName
string or null <= 45 characters ^[\w\s\-\p{L},.']+$

Contact's first name.

lastName
string or null <= 45 characters ^[\w\s\-\p{L},.']+$

Contact's last name.

organization
string or null <= 255 characters ^[\w\s\-\p{L},.'&]+$

Contact's organization.

address
string or null <= 60 characters ^[\w\s\-\/\p{L},.#;:()'&]+$

First line of the contact's street address.

address2
string or null <= 60 characters ^[\w\s\-\/\p{L},.#;:()'&]+$

Second line of the contact's street address.

city
string or null <= 45 characters ^[\w\s\-\p{L},.']+$

Contact's city of residence.

region
string or null <= 45 characters ^[\w\s\-\/\p{L},.#;:()']+$

Contact's region of residence.

country
string or null <= 2 characters ^[A-Z]{2}$

Contact's country of residence in ISO 3166 alpha-2 country code. For examples, see ISO.org.

postalCode
string or null <= 10 characters ^[\w\s\-]+$

Contact's postal code.

Array of objects (ContactPhoneNumbers)

List of phone numbers associated with the contact.

Array
label
required
string <= 45 characters

Phone number label or name.

value
required
string <= 50 characters

Phone number value.

primary
boolean

Specifies if the phone number is the contact's primary phone number.

Array of objects (ContactEmails)

List of email addresses associated with the contact.

Array
label
required
string <= 45 characters

Email label or name.

value
required
string <email> <= 255 characters

Email address value.

primary
boolean

Specifies if the email address is the contact's primary email address.

dob
string or null <date>

Contact's date of birth in ISO-8601 YYYY-MM-DD format.

jobTitle
string or null <= 255 characters ^[\w\s\-\/\p{L},.#;:()']+$

Contact's job title.

stickyGatewayAccountId
string <= 50 characters

Sticky gateway account ID. All future payments are processed by this gateway account.

For more information, see Gateway routing.

customFields
object (ResourceCustomFields)
Default: {}

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)
Default: false

Specifies if this payment instrument can be used as a backup for invoice payment retries.

Responses
200

Payment instrument updated.

Response Schema: application/json
id
string <= 50 characters

ID of the payment instrument.

customerId
string (CustomerId) <= 50 characters

Customer resource ID.

method
string

Method of payment instrument.

status
string

Status of the payment instrument. An active status means that a payment instrument has been used at least once for an approved transaction. To remove an instrument from use, set this value to deactivated.

For more information, see Deactivate a payment instrument.

Enum: "active" "inactive" "expired" "deactivated" "verification-needed"
fingerprint
string

Unique value that is used to identify the payment instrument. This value is generated from the bin and the last4 values. This value contains alphanumeric characters.

bin
string <bin>

Bank Identification Number (BIN) of the payment card. This value is the same as the first 6 digits of the associated Primary Account Number (PAN).

last4
string

Last 4 digits of the associated Primary Account Number (PAN).

expYear
integer

Expiration year of the payment card.

expMonth
integer

Expiration month of the payment card.

brand
string

Brand of payment card.

Enum: "Visa" "MasterCard" "American Express" "Discover" "Maestro" "Solo" "Electron" "JCB" "Voyager" "Diners Club" … 4 more
bankCountry
string

Bank country of the payment instrument.

bankName
string

Bank name of the payment instrument.

object

Contact's billing address.

firstName
string or null <= 45 characters ^[\w\s\-\p{L},.']+$

Contact's first name.

lastName
string or null <= 45 characters ^[\w\s\-\p{L},.']+$

Contact's last name.

organization
string or null <= 255 characters ^[\w\s\-\p{L},.'&]+$

Contact's organization.

address
string or null <= 60 characters ^[\w\s\-\/\p{L},.#;:()'&]+$

First line of the contact's street address.

address2
string or null <= 60 characters ^[\w\s\-\/\p{L},.#;:()'&]+$

Second line of the contact's street address.

city
string or null <= 45 characters ^[\w\s\-\p{L},.']+$

Contact's city of residence.

region
string or null <= 45 characters ^[\w\s\-\/\p{L},.#;:()']+$

Contact's region of residence.

country
string or null <= 2 characters ^[A-Z]{2}$

Contact's country of residence in ISO 3166 alpha-2 country code. For examples, see ISO.org.

postalCode
string or null <= 10 characters ^[\w\s\-]+$

Contact's postal code.

Array of objects (ContactPhoneNumbers)

List of phone numbers associated with the contact.

Array
label
required
string <= 45 characters

Phone number label or name.

value
required
string <= 50 characters

Phone number value.

primary
boolean

Specifies if the phone number is the contact's primary phone number.

Array of objects (ContactEmails)

List of email addresses associated with the contact.

Array
label
required
string <= 45 characters

Email label or name.

value
required
string <email> <= 255 characters

Email address value.

primary
boolean

Specifies if the email address is the contact's primary email address.

dob
string or null <date>

Contact's date of birth in ISO-8601 YYYY-MM-DD format.

jobTitle
string or null <= 255 characters ^[\w\s\-\/\p{L},.#;:()']+$

Contact's job title.

hash
string <= 40 characters

Use this value to compare contacts for identical attribute values.

useAsBackup
boolean (UseAsBackup)
Default: false

Specifies if this payment instrument can be used as a backup for invoice payment retries.

billingPortalUrl
string

URL of the billing portal where the card can be updated.

createdTime
string <date-time> (CreatedTime)

Date and time which is set automatically when the resource is created.

updatedTime
string <date-time> (UpdatedTime)

Date and time which updates automatically when the resource is updated.

customFields
object (ResourceCustomFields)
Default: {}

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.

stickyGatewayAccountId
string or null

Sticky gateway account ID. All future payments are processed by this gateway account.

For more information, see Gateway routing.

expirationReminderTime
string or null <date-time>

Date and time when an expiration reminder event is triggered.

expirationReminderNumber
integer or null

Number of expiration reminder events that have triggered.

object

Payment instrument reference data.

property name*
additional property
string
digitalWallet
string or null

Digital wallet type.

Enum: "Apple Pay" "Google Pay"
object (Risk metadata)

Risk metadata used for 3D Secure and risk scoring.

ipAddress
string or null <ipv4 or ipv6>

Customer's IP address.

fingerprint
string or null <= 50 characters

Customer's device fingerprint. A device fingerprint is a unique token that is used to identify the customer. The device fingerprint is generated based on device attributes, such as: hardware, software, IP address, language, browser, and more.

object or null

HTTP headers.

property name*
additional property
string
object or null

Browser data used for 3D Secure and risk scoring.

colorDepth
required
integer [ 1 .. 48 ]

Browser color depth in bits per pixel. This value is obtained using the screen.colorDepth property.

isJavaEnabled
required
boolean

Specifies if Java is enabled in a browser. This value is obtained from the navigator.javaEnabled property.

language
required
string <= 8 characters

Browser language settings. This value is obtained from the navigator.language property.

screenWidth
required
integer [ 0 .. 65535 ]

Width of the browser screen. This value is obtained from the screen.width property.

screenHeight
required
integer [ 0 .. 65535 ]

Height of the browser screen. This value is obtained from the screen.height property.

timeZoneOffset
required
integer [ -1410 .. 1410 ]

Browser time zone offset in minutes from UTC. A positive offset indicates that the local time is behind UTC. A negative offset indicates that the local time is ahead of UTC. You can find this value using the (new Date()).getTimezoneOffset() property.

object or null

Third-party data used for risk scoring.

kountFraudSessionId
string [ 10 .. 32 ]

Alpha-numeric fraudSessionId as provided by the Kount SDK.

payPalMerchantSessionId
string [ 1 .. 64 ]

PayPal MerchantSessionID as generated by the PayPal Fraudnet SDK.

threatMetrixSessionId
string [ 1 .. 128 ] [a-zA-Z0-9_-]+

Temporary identifier that is unique to the visitor's session and passed to ThreatMetrix.

isProxy
boolean

Specifies if the customer's IP address is related to a proxy.

isVpn
boolean

Specifies if the customer's IP address is related to a VPN.

isTor
boolean

Specifies if the customer's IP address is related to TOR.

isHosting
boolean

Specifies if the customer's IP address is related to hosting.

vpnServiceName
string or null

VPN service name, if available.

isp
string or null

Internet Service Provider (ISP) name, if available.

country
string or null <= 2 characters

Country ISO Alpha-2 code of the specified IP address.

region
string or null

Region of the specified IP address.

city
string or null

City of the specified IP address.

latitude
number <double>

Latitude of the specified IP address.

longitude
number or null <double>

Longitude of the specified IP address.

postalCode
string or null <= 10 characters

Postal code of the specified IP address.

timeZone
string or null

Time zone of the specified IP address.

accuracyRadius
integer or null

Accuracy radius of the specified IP address, in kilometers.

distance
integer or null

Distance between the customer's IP address and the billing address geolocation, in kilometers.

hasMismatchedBillingAddressCountry
boolean

Specifies if the customer's billing address country and geo-IP address are not the same.

hasMismatchedBankCountry
boolean

Specifies if the customer's bank country and geo-IP address are not the same.

hasMismatchedTimeZone
boolean

Specifies if the customer's browser time zone and the IP address associated time zone are not the same.

hasMismatchedHolderName
boolean

Specifies if the customer's billing address name and primary address name are not the same.

hasFakeName
boolean

Specifies if the holder name seems fake.

isHighRiskCountry
boolean

Specifies if the geo-IP country, or the customer's billing country, is considered a high risk country.

paymentInstrumentVelocity
integer

Number of transactions for this payment instrument, based on fingerprint, in the last 24 hours.

declinedPaymentInstrumentVelocity
integer

Number of declined transactions for this payment instrument fingerprint in the last 24 hours.

deviceVelocity
integer

Number of transactions for this device, based on fingerprint, in the last 24 hours.

ipVelocity
integer

Number of transactions for this IP address in the last 24 hours.

emailVelocity
integer

Number of transactions for this email address in the last 24 hours.

billingAddressVelocity
integer

Number of transactions for this billing address in the last 24 hours.

score
integer

Computed risk score based on all factors.

Array of objects

Related links.

Array
href
string

Link URL.

rel
string

Type of link.

Enum: "self" "customer" "authTransaction" "approvalUrl"
object

Embedded objects that are requested by the expand query parameter.

authTransaction
object
customer
object
401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

404

Resource not found.

422

Invalid data sent.

patch/payment-instruments/{id}
Request samples
application/json
{
  • "token": "string",
  • "billingAddress": {
    },
  • "stickyGatewayAccountId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "customFields": {
    },
  • "useAsBackup": false
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "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": {
    },
  • "useAsBackup": false,
  • "billingPortalUrl": "string",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "customFields": {
    },
  • "stickyGatewayAccountId": "string",
  • "expirationReminderTime": "2019-08-24T14:15:22Z",
  • "expirationReminderNumber": 0,
  • "referenceData": {
    },
  • "digitalWallet": "Apple Pay",
  • "riskMetadata": {
    },
  • "_links": [
    ],
  • "_embedded": {
    }
}