Use our Identity Service to generate a Bearer token to include in the header of your requests. To generate your Bearer token, complete the following steps:
Include your API key in the x-api-key parameter in the header of a POST request.
Important: This method includes the following functions:
Tokenization
Pre-authorization
Currency conversion
Offline processing
We don’t describe how to integrate with these functions in this guide.
Request parameters
To create the body of your request, use the following parameters:
Request
channelenumRequired
Channel that the merchant used to receive the payment details.
Allowed values:
processingTerminalIdstringRequired4-50 characters
Unique identifier that we assigned to the terminal.
orderobjectRequired
Object that contains information about the payment.
paymentMethodobjectRequired
Polymorphic object that contains payment details.
The value of the type parameter determines which variant you should use:
- `card` - Payment card details
- `secureToken` - Secure token details
- `digitalWallet` - Digital wallet details
- `singleUseToken` - Single-use token details
operatorstringOptional0-50 characters
Operator who ran the transaction.
customerobjectOptional
Object that contains the customer's contact details and address information.
ipAddressobjectOptional
Object that contains the IP address of the device that sent the request.
threeDSecureobjectOptional
Polymorphic object that contains authentication information from 3-D Secure.
The value of the serviceProvider parameter determines which variant you should use:
- `gateway` - Use our gateway to run a 3-D Secure check.
- `thirdParty` - Use a third party to run a 3-D Secure check.
credentialOnFileobjectOptional
Object that contains information about saving the customer’s payment details.
offlineProcessingobjectOptional
Object that contains information about the transaction if the merchant ran it when the terminal was offline.
autoCapturebooleanOptionalDefaults to true
Indicates if we should automatically capture the payment amount.
- `true` - Run a sale and automatically capture the transaction.
- `false`- Run a pre-authorization and capture the transaction later.
**Note:** If you send `false` and the terminal doesn't support pre-authorization, we set the transaction's status to pending. The merchant must capture the transaction to take payment from the customer.
processAsSalebooleanOptionalDefaults to false
Indicates if we should immediately settle the sale transaction. The merchant cannot adjust the transaction if we immediately settle it.
**Note:** If the value for **processAsSale** is `true`, the gateway ignores the value in **autoCapture**.
If your request is successful, our gateway uses the card details to run a sale. The response contains the following fields:
Response
paymentIdstringRequired=10 characters
Unique identifier that our gateway assigned to the transaction.
processingTerminalIdstringRequired4-50 characters
Unique identifier of the terminal that initiated the transaction.
orderobjectRequired
Object that contains information about the payment.
cardobjectRequired
Object that contains the details of the payment card.
transactionResultobjectRequired
Object that contains information about the transaction response details.
operatorstringOptional0-50 characters
Operator who initiated the request.
customerobjectOptional
Object that contains the customer's contact details and address information.
refundslist of objectsOptional
Array of refundSummary objects.
Each object contains information about refunds linked to the transaction.
supportedOperationslist of enumsOptional
Array of operations that you can perform on the transaction.
- `capture` - Capture the payment.
- `refund` - Refund the payment.
- `fullyReverse` - Fully reverse the transaction.
- `partiallyReverse` - Partially reverse the payment.
- `incrementAuthorization` - Increase the amount of the authorization.
- `adjustTip` - Adjust the tip post-payment.
- `addSignature` - Add a signature to the payment.
- `setAsReady` - Set the transaction’s status to `ready`.
- `setAsPending` - Set the transaction’s status to `pending`.
customFieldslist of objectsOptional
Array of customField objects.
Example response
Response
1
{
2
"paymentId": "J9VULKIKFP",
3
"processingTerminalId": "1234001",
4
"order": {
5
"amount": 4999,
6
"currency": "USD",
7
"orderId": "1234567890W",
8
"dateTime": "2024-07-02T15:30:00Z",
9
"description": "Card Transaction (APPLE)"
10
},
11
"card": {
12
"type": "MasterCard",
13
"entryMethod": "keyed",
14
"cardNumber": "500165******0000",
15
"expiryDate": "0328",
16
"securityChecks": {
17
"avsResult": "U"
18
}
19
},
20
"transactionResult": {
21
"status": "ready",
22
"responseCode": "A",
23
"type": "sale",
24
"approvalCode": "OK3",
25
"authorizedAmount": 4999,
26
"currency": "USD",
27
"responseMessage": "APPROVAL",
28
"processorResponseCode": "00"
29
},
30
"operator": "Jane",
31
"supportedOperations": [
32
"capture",
33
"fullyReverse",
34
"partiallyReverse",
35
"incrementAuthorization",
36
"adjustTip",
37
"setAsPending"
38
]
39
}
Test cases
Before you run test cases, read the Payments page in Test Your Integration.