Skip to content
payrocdevelopers

Partially update secure token

Browse API reference

PATCH/processing-terminals/{processingTerminalId}/secure-tokens/{secureTokenId}updateSecureToken

Use this method to partially update a secure token. Structure your request to follow the RFC 6902 standard.

To update a secure token, you need its secureTokenId, which you sent in the request of the Create Secure Token method.

Note: If you don't have the secureTokenId, use our List Secure Tokens method to search for the payment.

You can update all of the properties of the secure token, except the following:

  • processingTerminalId
  • type
  • token
  • status
  • source/Card
    • type
    • cardNumber
    • cardType
    • currency
    • debit
    • surcharging
  • source/ACH account
    • accountNumber
    • routingNumber
  • source/PAD account
    • type
    • accountNumber
    • transitNumber

Parameters

NameInTypeDescription
Idempotency-KeyRequiredheaderstring

Unique identifier that you generate for each request. You must use the UUID v4 format for the identifier. For more information about the idempotency key, go to Idempotency.

processingTerminalIdRequiredpathstring

Unique identifier that we assigned to the terminal.

secureTokenIdRequiredpathstring

Unique identifier that the merchant assigned to the secure token.

Request body

application/json · required
  • Patch Add Operationobject
    A Patch Add Operation.
    • opstringrequired
      add operation.add
    • pathstringrequired
      Location where you want to add the value. The format for this value is JSON Pointer.
    • valueobjectrequired
      Value that you want to add to the resource.
  • Patch Remove Operationobject
    A Patch Remove Operation.
    • opstringrequired
      remove operation.remove
    • pathstringrequired
      Location of the value that you want to remove. The format for this value is JSON Pointer.
  • Patch Replace Operationobject
    A Patch Replace Operation.
    • opstringrequired
      replace operation.replace
    • pathstringrequired
      Location of the value that you want to replace. The format for this value is JSON Pointer.
    • valueobjectrequired
      Value that you want to use as the replacement.
  • Patch Move Operationobject
    A Patch Move Operation.
    • fromstringrequired
      Location of the value that you want to move. The format for this value is JSON Pointer.
    • opstringrequired
      move operation.move
    • pathstringrequired
      Location where you want to move the value to. The format for this value is JSON Pointer.
  • Patch Copy Operationobject
    A Patch Copy Operation.
    • fromstringrequired
      Location of the value that you want to copy. The format for this value is JSON Pointer.
    • opstringrequired
      copy operation.copy
    • pathstringrequired
      Location where you want to copy the value to. The format for this value is JSON Pointer.
  • Patch Test Operationobject
    A Patch Test Operation.
    • opstringrequired
      test operation.test
    • pathstringrequired
      Location of the value that you want to test. The format for this value is JSON Pointer.
    • valueobjectrequired
      Value that you want to compare with the current value at the path.

Responses

Successful request. We updated the customer's payment details.

200 OK · application/json
{
  "customFields": [
    {
      "name": "yourCustomField",
      "value": "abc123"
    },
    {
      "name": "loyaltyTier",
      "value": "gold"
    }
  ],
  "customer": {
    "billingAddress": {
      "address1": "1 Example Ave.",
      "address2": "Example Address Line 2",
      "address3": "Example Address Line 3",
      "city": "Chicago",
      "country": "US",
      "postalCode": "60056",
      "state": "Illinois"
    },
    "contactMethods": [
      {
        "type": "email",
        "value": "sarah.hopper@example.com"
      }
    ],
    "dateOfBirth": "1990-07-15",
    "firstName": "Sarah",
    "lastName": "Hopper",
    "notificationLanguage": "en",
    "referenceNumber": "Customer-12",
    "shippingAddress": {
      "address": {
        "address1": "1 Example Ave.",
        "address2": "Example Address Line 2",
        "address3": "Example Address Line 3",
        "city": "Chicago",
        "country": "US",
        "postalCode": "60056",
        "state": "Illinois"
      },
      "recipientName": "Sarah Hopper"
    }
  },
  "mitAgreement": "unscheduled",
  "processingTerminalId": "1234001",
  "secureTokenId": "MREF_abc1de23-f4a5-6789-bcd0-12e345678901fa",
  "source": {
    "cardNumber": "453985******7062",
    "cardholderName": "Sarah Hazel Hopper",
    "expiryDate": "1230",
    "type": "card"
  },
  "status": "notValidated",
  "token": "296753123456"
}
Response schema · 51 of 70 fields
  • customFieldsobject[]
    Array of customField objects.
    • namestringrequired
      Name of the custom field.1–56 chars
    • valuestringrequired
      Value for the custom field.1–100 chars
  • customerobject
    Object that contains the customer's contact details and address information.
    • billingAddressobject
      Object that contains information about the address.
      • address1string
        Address line 1.≤ 150 chars
      • address2string
        Address line 2.≤ 150 chars
      • address3string
        Address line 3.≤ 150 chars
      • citystring
        City.≤ 50 chars
      • countrystring
        Two-digit country code for the country that the business operates in. The format follows the ISO-3166-1 standard.2–2 chars
      • postalCodestring
        Zip code or postal code.≤ 10 chars
      • statestring
        Name of the state or state abbreviation.≤ 50 chars
    • contactMethodsobject[]
      Array of polymorphic objects, which contain contact information. The value of the type parameter determines which variant you should use: email Email address phone Phone number mobile Mobile number fax Fax number
      • emailobject
        +2 more fields at deeper levels — see the full spec
      • phoneobject
        +2 more fields at deeper levels — see the full spec
      • mobileobject
        +2 more fields at deeper levels — see the full spec
      • faxobject
        +2 more fields at deeper levels — see the full spec
    • dateOfBirthstringdate
      Customer's date of birth. The format for this value is YYYY-MM-DD.
    • firstNamestring
      Customer's first name.0–60 chars
    • lastNamestring
      Customer's last name.0–60 chars
    • notificationLanguagestringiso-639-1
      Language that the customer uses for notifications. This code follows the ISO 639-1 alpha-2 standard.2–2 charsenfr
    • referenceNumberstring
      Identifier of the transaction, also known as a customer code. For requests, you must send a value for referenceNumber if the customer provides one.0–48 chars
    • shippingAddressobject
      Object that contains information about the customer and their shipping address.
      • addressobject
        Object that contains information about the address.+7 more fields at deeper levels — see the full spec
      • recipientNamestring
        Recipient's name.0–50 chars
  • mitAgreementstring
    Indicates how the merchant can use the customer's card details, as agreed by the customer: unscheduled Transactions for a fixed or variable amount that are run at a certain pre-defined event. recurring Transactions for a fixed amount that are run at regular intervals, for example, monthly. Recurring transactions don't have a fixed duration and run until the customer cancels the agreement. installment Transactions for a fixed amount that are run at regular intervals, for example, monthly. Installment transactions have a fixed duration.unscheduledrecurringinstallment
  • processingTerminalIdstringrequired
    Unique identifier that we assigned to the terminal.4–50 chars
  • secureTokenIdstringrequired
    Unique identifier that the merchant created for the secure token that represents the customer's payment details.0–200 chars
  • sourceobjectrequired
    Polymorphic object that contains the payment method that we tokenized. The value of the type parameter determines which variant you should use: ach Automated Clearing House (ACH) details pad Pre-authorized debit (PAD) details card Payment card details
    • achobject
      Object that contains the customer's account details.
      • accountNumberstringrequired
        Customer's account number.4–17 chars^[0-9]*$
      • nameOnAccountstringrequired
        Customer's name.1–50 chars
      • routingNumberstringrequired
        Routing number of the customer's account.9–9 chars^[0-9]*$
      • typestringrequired
        ach
    • padobject
      Object that contains the customer's account details.
      • accountNumberstringrequired
        Customer's account number.7–12 chars^[0-9]*$
      • institutionNumberstringrequired
        Three-digit code that represents the customer's bank.3–3 chars^[0-9]*$
      • nameOnAccountstringrequired
        Customer's name.1–29 chars
      • transitNumberstringrequired
        Five-digit code that represents the customer's banking branch.5–5 chars^[0-9]*$
      • typestringrequired
        pad
    • Cardobject
      Object that contains the customer's card details.
      • cardNumberstringrequired
        Primary account number of the customer's card.12–19 chars
      • cardTypestring
        Card brand of the card, for example, Visa.
      • cardholderNamestringrequired
        Cardholder's name.1–50 chars
      • currencystring
        Currency of the transaction. The value for the currency follows the ISO 4217 standard.AEDAFNALLAMDANGAOAARSAUD+163 more
      • debitboolean
        Indicates if the card is a debit card.
      • expiryDatestring
        Expiry date of the customer's card.[0-9]{4}
      • surchargingobject
        Object that contains surcharge information. Our gateway returns this object only if the merchant adds a surcharge to transactions.+4 more fields at deeper levels — see the full spec
      • typestringrequired
        Type of payment.card
  • statusstringrequired
    Outcome of a security check on the status of the customer's payment card or bank account. Note: Depending on the merchant's account settings, this feature may be unavailable.notValidatedcvvValidatedvalidationFailedissueNumberValidatedcardNumberValidatedbankAccountValidated
  • tokenstringrequired
    Token that the merchant can use in future transactions to represent the customer's payment details. The token: Begins with the six-digit identification number 296753. Contains up to 12 digits. Contains a single check digit that we calculate using the Luhn algorithm.12–19 chars

Used in workflows

Search documentation

API reference169
Guides118
Knowledge38
legal1
Solutions32
Workflows74
↑↓highlight↵openView all search results

Menu

Theme

Sign out

Your saved plans remain in your organization. This browser’s private draft and account view will be cleared.

Talk to an engineer