Search Overlay

Integrating Paysafe REST APIs

Please Note: As an ISV / Paysafe Partner, you will need to complete all of the below "merchant" steps on behalf of the Parent Merchant Legal Entity (PMLE) that your merchants will be operating under.

Once you have successfully integrated with the Google Pay API, you can now complete your integration with our REST APIs to process Google Pay transactions.

  • Get a Paysafe single-use token using the data provided by Google Pay

    POST /customervault/v1/googlepaysingleusetokens

{
"googlePayPaymentToken": {
"apiVersionMinor": 0,
"apiVersion": 2,
"paymentMethodData": {
"description": "Skrill •••• 4597",
"tokenizationData": {
"type": "PAYMENT_GATEWAY",
"token": "{\"signature\":\"MEUCIQCOBaF2OiX+m3iw1tMd3TBkJ4bO9CiKhvSKG9elDDDlXwIgGJCfxutVjCvPrcuMtzEc21asAVJHmkdaLTevoIXuC70\\u003d\",\"protocolVersion\":\"ECv1\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"bzGaySH3i0KWgXnkLWlR82pSuVW+ziiOD0FOZ3PNq+7bshtRFZeGJsM3/L2Gs+F0EPnbIM2TDXMYGaFP89g1h23bZ/jGlp1Nw+a3qYI3tmo7zn/bOd5bw8u3ahoWCXB6JWe4bBZUHnMjhmOaN1mufUdH3dmf5kc1E7qY3ajzmCmkZr3AwGk2NtD+DZodt50gqWUC3G5W10VZeWwdazUVvEi/PPHJ4ZVl1ONsSYioITmRQQE4CDuLTZU5uICvGVGi61YpWlYBlfHgxr5uK+klaco9949n3UJ54ul8PaOe0Rx46KPveHIM/mefHjjnPj3K3f8LOhM6LBqsGgt707vv39MuF92fFoAEkzQ035iX3mmNAVbCKna/50Y3fiv2vWYh7QyIEeu2tc26rPv0FNkV+0ewsn0NnZIteX/Hxr6JH14GHUEjbkxLJrfFnn4VVQTvQLtjeg\\\\u003d\\\\u003d\\\",\\\"ephemeralPublicKey\\\":\\\"BAPING9pvMpDRhD3Ups4HX+ePz3FlfRq5VKgLpvQC4ScVjwNPINQaHsWne0NjgvQREa5xMJ4KdPXuNkUNQufVLc\\\\u003d\\\",\\\"tag\\\":\\\"nDtdbdu/D3LZbP7kGTNXeECjMAF/T0aS/LdVmFt7Bs8\\\\u003d\\\"}\"}"
},
"type": "CARD",
"info": {
"cardNetwork": "MASTERCARD",
"cardDetails": "4597",
"billingAddress": {
"phoneNumber": "+15143802700",
"address3": "",
"sortingCode": "",
"address2": "",
"countryCode": "CA",
"address1": "3500 Boulevard de Maisonneuve Westmount Montreal Canada",
"postalCode": "H3Z 3C1",
"name": "John Doe",
"locality": "Westmount",
"administrativeArea": "QC"
}
}
},
"shippingOptionData": {
"id": "shipping-001"
},
"shippingAddress": {
"address3": "",
"sortingCode": "",
"address2": "",
"countryCode": "US",
"address1": "2600 Michelson Drive",
"postalCode": "92612",
"name": "John Doe",
"locality": "ALTADENA",
"administrativeArea": "CA"
}
}
}

{
"id": "b09f9dbb-afb7-4555-aedc-c9998cf07442",
"paymentToken": "GE4Lo73CJ9uFliO",
"timeToLiveSeconds": 899,
"googlePayPaymentToken": {
"ephemeralPublicKey": "BAPING9pvMpDRhD3Ups4HX+ePz3FlfRq5VKgLpvQC4ScVjwNPINQaHsWne0NjgvQREa5xMJ4KdPXuNkUNQufVLc=",
"tag": "nDtdbdu/D3LZbP7kGTNXeECjMAF/T0aS/LdVmFt7Bs8=",
"paymentMethod": "CARD_ON_FILE",
"messageId": "AH2Ejtd6O8PI5WVCz5JKMWEa5OJ1JlhzrdmbYVbC2l1VT7qyUctVzDUvHV7nQemRcZ9L0oF2YNXks352frl_jqssR3FICBYIzn8kkmpZOCqx-etvSaKrnncWi9CEn7_GXyvC98ebac0-",
"messageExpiration": "1625832458302",
"paymentMethodData": {
"info": {
"cardNetwork": "MASTERCARD",
"cardDetails": "4597",
"billingAddress": {
"phoneNumber": "+15143802700",
"address3": "",
"sortingCode": "",
"address2": "",
"countryCode": "CA",
"address1": "3500 Boulevard de Maisonneuve Westmount Montreal C",
"postalCode": "H3Z 3C1",
"name": "John Doe",
"locality": "Westmount",
"administrativeArea": "QC"
}
}
}
},
"card": {
"status": "ACTIVE",
"cardBin": "411111",
"lastDigits": "1111",
"cardType": "VI",
"cardCategory": "CREDIT"
}
}

The Test environments of Google and Paysafe return payment tokens that you can use for test purposes only. These tokens are not live chargeable tokens.

You should check the value of the paymentMethod whether it is "CARD_ON_FILE" or "TOKENIZED CARD". Based on this information, you should use only the corresponding Paysafe merchant id.

In the response, you will find a paymentToken value and the cardBin to include with your Authorization or Purchase request in the Card Payments API.

If the paymentMethod is CARD_ON_FILE, then you should invoke the 3DS flow in compliance with the SCA requirements.

  • From your server, call the Card Payments API to process a transaction using the single-use token.
    From your server, use the single-use token (paymentToken) to make an authorization or purchase request to our Card Payments API.

This call needs to be made using the API key for server-to-server API calls.

POST /cardpayments/v1/accounts/account_id/auths

curl -X POST https://api.test.paysafe.com/cardpayments/v1/accounts/1001087580/auths \
-u devcentre322:B-qa2-0-53625f86-302c021476f52bdc9deab7aea876bb28762e62f92fc6712d0214736abf501e9675e55940e83ef77f5c304edc7968 \
-H 'Content-Type: application/json' \
-d ' {
"merchantRefNum" : "payment-token-demo-1",
"amount" : 500,
"settleWithAuth":true,
"card" : {
"paymentToken" : "CaBP0abDKgROjYU"
},
"billingDetails": {
"street":"100 Queen Street West",
"city":"Toronto",
"state":"ON",
"country":"CA",
"zip":"M5H 2N2"
}
} '

{
"links": [
{
"rel": "settlement",
"href": "https://api.test.paysafe.com/cardpayments/v1/accounts/1001087580/settlements/25c5a148-c5aa-4157-8318-c91961e1128e"
},
{
"rel": "self",
"href": "https://api.test.paysafe.com/cardpayments/v1/accounts/1001087580/auths/25c5a148-c5aa-4157-8318-c91961e1128e"
}
],
"id": "25c5a148-c5aa-4157-8318-c91961e1128e",
"merchantRefNum": "payment-token-demo-1",
"txnTime": "2017-03-06T20:42:06Z",
"status": "COMPLETED",
"amount": 520,
"settleWithAuth": true,
"preAuth": false,
"availableToSettle": 0,
"card": {
"type": "VI",
"lastDigits": "2345",
"cardExpiry": {
"month": 2,
"year": 2020
}
},
"authCode": "100614",
"billingDetails": {
"street": "100 Queen Street West",
"city": "Toronto",
"state": "ON",
"country": "CA",
"zip": "M5H2N2"
},
"merchantDescriptor": {
"dynamicDescriptor": "DD Line 1",
"phone": "000-111000099"
},
"currencyCode": "GBP",
"avsResponse": "MATCH",
"cvvVerification": "NOT_PROCESSED",
"settlements": [
{
"links": [
{
"rel": "self",
"href": "https://api.test.paysafe.com/cardpayments/v1/accounts/1001087580/settlements/25c5a148-c5aa-4157-8318-c91961e1128e"
}
],
"id": "25c5a148-c5aa-4157-8318-c91961e1128e",
"merchantRefNum": "payment-token-demo-1",
"txnTime": "2017-03-06T20:42:06Z",
"status": "PENDING",
"amount": 520,
"availableToRefund": 520
}
]
}
  • Send the response your server receives from the Card Payments API to the web.
    The Card Payments API will return a response (successful or failed) to your server, which you need to send back to your application.

The request and response format is the same as for regular tokenized card payments requests and responses.

On this Page