Skip to main content

GetPaymentTokenResponse

Response to the API Call to fetch the payment_token

midstringrequired

The Merchant ID (MID) is a configuration unit assigned to a merchant, defining processing parameters such as currency and operational settings. A merchant may have multiple MIDs, including multiple MIDs with the same currency, to support different configurations or requirements.

Example: 9000001500
customer objectrequired

Details and/or restriction for the customer are provided in this object

idstringrequired

Merchant customer identifier

Example: TestUser123
emailstringrequired

E-mail used to create the PaysafeCard account

Example: customer@email.com
association_idstringrequired

Association ID used afterwards to retrieve the payment token

Example: spi_gp2ksSLbpPoZ4WmyxpxsQLWpSI
success_urlstring<uri>required

URL where the customer is redirected after successfully giving the consent. In this case it is copied from the call to create association.

Example: https://www.guinbox.com/notes/uC5lKyzh74x
failure_urlstring<uri>required

URL where the customer is redirected if the customer cancels the transactions. In this case it is copied from the call to create association.

Example: https://www.guinbox.com/notes/FP8gU99Wj7u
statusstringrequired

Provides information on the status of the payment_token.

Example: VALID
createdinteger<int64>required

Unix timestamp in milliseconds when the payment was created

Example: 1781533110699
updatedinteger<int64>required

Unix timestamp in milliseconds of the last update

Example: 1781533153610
payment_tokenstringrequired

Payment token to be used in future merchant initiated payments

Example: spi_ZmBMcOQNuH3dRTeDReSZBjLIbb
expiration_dateinteger<int64>required

Unix timestamp in milliseconds of the last update

Example: 1813069153592
GetPaymentTokenResponse
{
"mid": 9000001500,
"customer": {
"id": "TestUser123",
"email": "customer@email.com"
},
"association_id": "spi_gp2ksSLbpPoZ4WmyxpxsQLWpSI",
"success_url": "https://www.guinbox.com/notes/uC5lKyzh74x",
"failure_url": "https://www.guinbox.com/notes/FP8gU99Wj7u",
"status": "VALID",
"created": 1781533110699,
"updated": 1781533153610,
"payment_token": "spi_ZmBMcOQNuH3dRTeDReSZBjLIbb",
"expiration_date": 1813069153592
}