Request to create a gateway token, which is used to represent sensitive payment data in a secure and tokenised form.
- Production environmenthttps://api-services.pxp.io/api/v1/token-vault/{ownerType}/{ownerId}/vaults/gateway-tokens
- Sandbox environmenthttps://api-services.test.pxp.io/api/v1/token-vault/{ownerType}/{ownerId}/vaults/gateway-tokens
curl -i -X POST \
https://api-services.pxp.io/api/v1/token-vault/MerchantGroup/MERCHANT-GROUP-1/vaults/gateway-tokens \
-H 'Content-Type: application/json' \
-d '{
"card": {
"primaryAccountNumber": "4111111111111111",
"expiryMonth": "03",
"expiryYear": "2025",
"holderName": "Mr John Doe",
"cardVerificationCode": "123"
},
"customerConsent": {
"hasCustomerConsent": true,
"merchantId": "MERCHANT-001",
"merchantShopperId": "6152"
}
}'Successful creation of the gateway token
A securely stored token that corresponds to a previously saved payment card. This token is generated and maintained by PXP to facilitate recurring transactions or transactions using stored card details, ensuring enhanced security and convenience. When a transaction is performed with a saved card, this gateway token ID should be provided instead of the full card details. This approach enhances security by reducing the exposure of sensitive card information and simplifies the transaction process for returning customers.
Example:"7f46c09d-d1d1-4f94-9a88-6e8ac32e6341"
The masked primary account number (PAN) of the card.
Example:"123456******7890"
Response
{ "gatewayTokenId": "7f46c09d-d1d1-4f94-9a88-6e8ac32e6341", "maskedPrimaryAccountNumber": "123456******7890", "fundingSource": "Credit" }