RC Request API
The RC Request API is a web service that allows PaysafeCard and PaysafeCash business partners to request new RC (reporting criteria) automatically.
The API is a great choice when the business partner:
- Regularly needs to onboard more sub-merchants (simply said, frequently requests new RC)
- Wants to avoid the hassle of files sent by mail
- Wants to receive real time notifications about the status of your RC requests
- Wants to know in real time which RC requests need additional information
- Wants to know in real time when the RC requested are ready for processing
Endpoint
Production environment: https://api.paysafecard.com/v1/management/
This integration can not be tested on our test environment.
Limits
- A maximum of 50 RCs can be requested in a single API call
- Maximum of 5 products per RC
- Maximum of 2 features per product
RC status
During the process of activating the RC, it can have multiple statuses.
| Value | Description |
|---|---|
received | PaysafeCard successfully received the RC request and will initiate the process for its creation. |
pending | PaysafeCard needs more information before approving the RC. Please contact psp.support@paysafe.com with the RC name. |
declined | The RC has been declined. Please contact psp.support@paysafe.com or the Key Account Manager with the RC name to clarify the decline reason. |
approved | The RC has been approved and it is ready to be used. |
RC Request API Process
This section describes in detail the technical process of an RC request.
- The business partner initiates the RC request: POST call request rc
- PaysafeCard validates the request and answers immediately with http 200 and status "received"
- PaysafeCard initiates the internal process for a new RC request
- Once the internal process is completed and the RC is ready to be used, PaysafeCard updates the business partner with the RC status "approved", using the callback_url url provided in the request rc call
- If PaysafeCard needs more information before completing the request, PaysafeCard updates the business partner with the RC status "pending". In this case the business partner must contact psp.support@paysafe.com with the RC name.
- (optional) The business partner checks the status of the RC request with a GET request.
Callback notification
The callback notification is an HTTP POST request sent to the business partner callback_url provided in the request rc call, immediately and everytime the status of an RC is updated by PaysafeCard.
The business partner server must respond with HTTP 200 and the authenticity of the callback notification should be verified.
During the RC Request API integration, the PaysafeCard team will provide a public key to the business partner which can be used to verifiy the authenticity of the callback notification.
In case of technical errors (e.g. socket timeout) or application errors, the callback notification is resubmitted at a regular interval of 1 minute until one of the following criteria is fulfilled:
- The notification is successfully delivered (i.e. HTTP 200 response from payment server).
- The maximum number of retry attempts has been reached (currently configured to 5 retries).
How to verifiy the Callback notification
The callback notification is signed with "rsa-sha256" and the signature can be found in the HTTP "Authorization" header.
HTTP headers
Content-Type: application/json
Authorization: keyId="1",algorithm="rsa-sha256",signature="OFPVO1uqac0U18LlEedwfdYaIPuuCIsvSxuDRV+nsU33F2TVYapR/JHR0mvJSAZUJWUTJk60PZXPhGF9eQLeIidxX1yJg8JA0pC0/CAt7JbiF39KsjMYMkCPp51q84s1RqAa23D2sljJuvPQYiDJLPlZ7PRSxYaIfmJ6MWzRq4Ku4XVi6OpqgAkO5V205UsDBmp8mxc00w1Eu5yAPoUjelZfxqHl/G2D0e5hWPuggtx/3hx2szFQDJzfHdRBhrlSqcU2WGzByXhy6A6FzeOQVysQNAR1/i+ztlhfCotY11Usb+Uh4yUVwi/I0pbKL+UJZ2VZlI6++SAO7CoQVkBAiw=="
| Parameter | Description |
|---|---|
keyId | The signature key version id. It has always the value "1" except if communicated otherwise by the PaysafeCard integration team. |
algorithm | The algorithm used for the signature. A callback notification from PaysafeCard will always be signed with "rsa-sha256". |
signature | The signature of the callback notification. |
payload
{
"submerchants": [
{
"id": "rc01",
"status": "approved",
"mids": [
"1000000007",
"1000000008",
"1000000009"
]
},
{
"id": "rc02",
"status": "pending",
"reason_text": "The merchant needs to add a product description."
},
{
"id": "rc03",
"status": "declined",
"reason_text":"Website is not fully operational."
}
],
"request_id": "psc_subid_e8P1asjSI8Gz4S60RwR6"
}
The signature is created as follows:
signature = base64encode(rsa_encrypt(sha256(payload), privateKey))
And it is verified as follows:
rsa_decrypt(base64decode(signature), publicKey) == sha256(payload)
Using the openssl dgst function to verify the signature
The digest functions can be used to verify digital signatures using message digests. The three steps below ilustrate how this can be done:
-
Extract the public key from the rsa key file sent with the data package
openssl rsa -RSAPublicKey_in -in webhook_signer_MANXXXXXXXXXX_1.rsa -out webhook_signer_MANXXXXXXXXXX_1_extracted.pem -
Decode the signature of the webhook notification with base64
Linux:
base64 --decode signature.txt > signature_debase64.txtWindows:
certutil.exe -decode signature.txt signature_debase64.txt -
Verify the signature using the openssl dgst function
The generic name, dgst, may be used with an option specifying the algorithm to be used. The default digest is sha256.
openssl dgst -sha256 -verify webhook_signer_MANXXXXXXXXXX_1_extracted.pem -signature signature_debase64.txt plaintext_payload.txtParameter Description -verify webhook_signer_MANXXXXXXXXXX_1_extracted.pemVerifies the signature using the public key extracted in step 1. The output is either Verification OKorVerification Failure.-signature signature_debase64.txtThe actual signature to verify in plain text, obtained in step 2. plaintext_payload.txtThe body of the payload in plain text.
RC Request parameters
| Parameter | Type | Constraint | Example | Description |
|---|---|---|---|---|
submerchants | array | mandatory | - | The array containing all the RC details. |
id | string | mandatory | rc01 | The RC id being requested. Only alphanumeric characteres allowed (0-9, A-Z and a-z). Size between 1 and 8 characters. |
company_name | string | mandatory | My Company | The name of the company to wich the RC is being requested for. Max. 70 characteres. Unicode characters are accpected. |
country_of_incorporation | string | mandatory | AT | The RC country of incorporation. ISO 3166-1 (2 letter country code). |
licenses | array | optional* | - | The licenses array containing all the RC licenses per country. *Mandatory, when the type of business is "BINARY_OPTIONS_SPREAD_BETTING", "FOREX", "PREPAID_CARDS_TOPUPS", "WALLETS", "POKER" or "SPORTSBOOK". |
country | string | mandatory | AT | The license country. ISO 3166-1 (2 letter country code). Mandatory as soon as a license object is given. |
type_of_business | string | mandatory | SPORTSBOOK | The RC type of business (sub channel). Max. 60 characters. List of all possible values at the bottom. |
mcc | string | optional | 7995 | The RC MCC (merchant category code) (sub channel). Either type_of_business OR mcc need to be supplied. List of all possible values at the bottom. |
webshops | array | mandatory | - | The webshop array contaning all the RC urls. Max. 5 urls per RC. |
url | string | mandatory | https://my.test.com | The webshop url. Max. 80 characters. Must be a valid url including protocol (see example). |
products | array | mandatory | - | The RC products and features array. Max. 5 products per RC. |
name | string | mandatory | PAYSAFECARD | The RC product. Max. 5 products per RC. The possible values are: "PAYSAFECARD", "PAYSAFECASH", "PAGOEFECTIVO", "SAFETYPAY" and "GIFTCARD". |
features | string | optional | PAYOUT | The RC feature. Max. 2 features per product. The possible values are: "PAYOUT" (only if the product is "PAYSAFECARD) and "REFUND" (only if the product is "PAYSAFECARD" or "PAYSAFECASH"). |
callback_url | string | mandatory | https://notification.com | The callback url to be used by PaysafeCard to inform about the RC status. Max. 1000 characters. Must be a valid url including protocol (see example). |
RC Request response parameters
POST response
| Parameter | Type | Example | Description |
|---|---|---|---|
submerchants | array | - | The RC array containing all the RC response details. |
id | string | rc01 | The id of the RC requested. |
status | string | received | The status of the RC requested. |
mids | string | "1000000007", "1000000008" | The mids (merchant ids) to which an RC was activated for. |
request_id | string | psc_subid_IO7DMI148X183oCcHlS7 | Request reference. |
reason_text | string | "Missing information on domain." | Reason for a pending/declined RC. In case of "pending", please contact us with the necessary information to proceed with the onboarding. |
GET response
| Parameter | Type | Example | Description |
|---|---|---|---|
id | string | rc01 | The id of the RC requested. |
status | string | received | The status of the RC requested. |
HTTP status codes
| Code | Short Description | Description |
|---|---|---|
| 200 | OK | Everything is OK. |
| 201 | Created | New object was successfully created. |
| 400 | Bad Request | Missing parameter. |
| 401 | Unauthorized | Invalid or expired API key. |
| 404 | Not Found | Not found. This is also returned when you try to retrieve a payment that does not exist. |
| 500 | Internal Server Error | This indicates a general technical error on PaysafeCard's end. |
| 501 | Not Implemented | Version feature not implemented. |
| 502 | Bad Gateway | Invalid response from upstream system. |
| 503 | Service Unavailable | Server overloaded. |
| 504 | Gateway Timeout | Timeout from upstream system. |
RC Request API Error Codes
This section describes all the relevant API error codes.
| Code | Number (optional) | HTTP Status | Description |
|---|---|---|---|
general_technical_error | 10007 | 500 | General technical error. |
invalid_api_key | 10008 | 401 | Authentication failed due to missing or invalid API key. Your key needs to be set to the HTTP auth header. |
invalid_request_parameter | 10028 | 400 | One of the request parameters failed validation. The message and param fields contain more detailed information. |
duplicate_request | 4001 | 400 | Submerchant has already been requested. |
400 Bad Request
{
"code": "invalid_request_parameter",
"message": "size must be between 1 and 8",
"number": 10028,
"param": "submerchants[0].id"
}
Annex: Type of business
The values allowed for the type_of_business (sub channel) parameter are:
| Channel | Subchannel (type_of_business) | MCC code (mcc) | MCC description |
|---|---|---|---|
| ENTERTAINMENT | CLOUD_STORAGE_BACKUP_SERVICES | 7299 | FILEHOSTING |
| ENTERTAINMENT | ROYALTY_FREE_IMAGES | 7299 | FILEHOSTING |
| ENTERTAINMENT | SOFTWARE_DOWNLOAD | 5734 | SOFTWARE_DOWNLOAD |
| ENTERTAINMENT | MEDIA_AUDIO_VIDEO | 5815 | MEDIA_AUDIO_VIDEO |
| ENTERTAINMENT | TCOMMERCE | 7299 | FILEHOSTING |
| ENTERTAINMENT | WEBHOSTING | 4816 | WEBHOSTING |
| ENTERTAINMENT | DATING | 7311 | DATING |
| ENTERTAINMENT | FORTUNE_TELLING_CONSULTING | 7996 | FORTUNE_TELLING_CONSULTING |
| ENTERTAINMENT | SOCIAL_NETWORKS_PORTALS | 4816 | WEBHOSTING |
| ENTERTAINMENT | MESSAGING_TELEPHONY | 4814 | MESSAGING_TELEPHONY |
| ENTERTAINMENT | FILEHOSTING | 7299 | FILEHOSTING |
| ENTERTAINMENT | TIPSTER | 7299 | FILEHOSTING |
| ENTERTAINMENT | CLASSIFIEDS | 7311 | DATING |
| ENTERTAINMENT | CHARITY | 8398 | CHARITY |
| GAMES | ONLINE_GAMES | 5818 | ONLINE_GAMES |
| GAMES | SKILL_GAMES | 7994 | SKILL_GAMES |
| GAMES | FANTASY_SPORTS | 7994 | SKILL_GAMES |
| GAMES | VIRTUAL_ITEMS | 5818 | ONLINE_GAMES |
| GAMES | ESPORTS | 7995 | SPORTSBOOK |
| GAMES | GAME_SERVER | 4816 | WEBHOSTING |
| GAMES | GAMES_ERETAIL | 5818 | ONLINE_GAMES |
| GAMES | STREAMING_GAMES | 7299 | FILEHOSTING |
| GAMES | BOXED_VIDEO_GAMES_PHYS_COPIES | 5945 | BOARD_GAMES_TABLETOPS |
| GAMES | GAMES_MERCHANDISE | 5945 | BOARD_GAMES_TABLETOPS |
| GAMES | BOARD_GAMES_TABLETOPS | 5945 | BOARD_GAMES_TABLETOPS |
| GAMES | GAMES_TICKETS | 7922 | GAMES_TICKETS |
| GAMES | GAMES_HARDWARE | 5399 | CONSUMER_GOODS |
| GAMES | COMIC_BOOKS_GAMES_LITERATURE | 5945 | BOARD_GAMES_TABLETOPS |
| GAMES | TOYS | 5945 | BOARD_GAMES_TABLETOPS |
| GAMES | SOCIAL_GAMBLING | 7994 | SKILL_GAMES |
| ERETAIL | CONSUMER_GOODS | 5399 | CONSUMER_GOODS |
| ERETAIL | AUCTIONS | 8999 | AUCTIONS |
| ERETAIL | VOUCHERSHOP | 6012 | WALLETS |
| ERETAIL | FASHION | 5691 | FASHION |
| ERETAIL | ELECTRONICS | 5732 | ELECTRONICS |
| ERETAIL | SPORTS_FITNESS | 5941 | SPORTS_FITNESS |
| ERETAIL | HOME | 5712 | HOME |
| ERETAIL | DIY_HOBBY | 5945 | BOARD_GAMES_TABLETOPS |
| ERETAIL | PERSONAL_CARE | 5977 | PERSONAL_CARE |
| ERETAIL | DRUGS_MEDICATION | 5912 | DRUGS_MEDICATION |
| ERETAIL | LUXURY_GOODS | 5399 | CONSUMER_GOODS |
| ERETAIL | DELIVERY_SERVICE | 4214 | DELIVERY_SERVICE |
| ERETAIL | TICKETING_FOR_EVENTS | 7922 | GAMES_TICKETS |
| ERETAIL | OTHER_ERETAIL | 5999 | OTHER_INDUSTRIES |
| GIFTCARDS | GIFTCARDS | 6012 | WALLETS |
| VOUCHERS | VOUCHERS | 6012 | WALLETS |
| FINANCIAL_SERVICES | BINARY_OPTIONS_SPREAD_BETTING | 6211 | FOREX |
| FINANCIAL_SERVICES | WALLETS | 6012 | WALLETS |
| FINANCIAL_SERVICES | PREPAID_CARDS_TOPUPS | 6012 | WALLETS |
| FINANCIAL_SERVICES | FOREX | 6211 | FOREX |
| FINANCIAL_SERVICES | COLLECTION_SERVICE | 6012 | WALLETS |
| FINANCIAL_SERVICES | ALTERNATIVE_BANKING | 6012 | WALLETS |
| FINANCIAL_SERVICES | BANK_PAYSAFE_LICENSE | 6012 | WALLETS |
| FINANCIAL_SERVICES | BANK_BANK_LICENSE | 6012 | WALLETS |
| FINANCIAL_SERVICES | INSURANCE | 5960 | INSURANCE |
| FINANCIAL_SERVICES | LOAN_PROVIDER | 6012 | WALLETS |
| FINANCIAL_SERVICES | MONEY_REMITTANCE | 6012 | WALLETS |
| POKER | POKER | 7995 | SPORTSBOOK |
| POKER | LOTTERY | 7995 | SPORTSBOOK |
| POKER | CASINO | 7995 | SPORTSBOOK |
| POKER | BINGO | 7995 | SPORTSBOOK |
| SPORTSBOOK | SPORTSBOOK | 7995 | SPORTSBOOK |
| SPORTSBOOK | ESPORTS_BETTING | 7995 | SPORTSBOOK |
| PAYMENT_SERVICE_PROVIDER | MERCHANT_OF_RECORD | 6012 | WALLETS |
| PAYMENT_SERVICE_PROVIDER | PAYMENT_GATEWAY | 6012 | WALLETS |
| PAYMENT_SERVICE_PROVIDER | TECHNICAL_SERVICE_PROVIDER | 6012 | WALLETS |
| PAYMENT_SERVICE_PROVIDER | AGGREGATOR | 6012 | WALLETS |
| PAYMENT_SERVICE_PROVIDER | SHOP_MODULE_ECOMMERCE_PLATFORM | 6012 | WALLETS |
| PAYMENT_SERVICE_PROVIDER | PLATFORM_PROVIDER | 6012 | WALLETS |
| PAYMENT_SERVICE_PROVIDER | OTHER_PSP | 6012 | WALLETS |
| ADULT | ADULT_MEDIA | 5967 | ADULT_MEDIA |
| ADULT | ADULT_ERETAIL | 5967 | ADULT_MEDIA |
| ADULT | ADULT_CLASSIFIEDS | 5967 | ADULT_MEDIA |
| ADULT | ADULT_DATING | 7273 | ADULT_DATING |
| ADULT | ADULT_GAMES | 5967 | ADULT_MEDIA |
| TRAVEL | TRAVEL_PORTAL | 4722 | OTHER_TRAVEL |
| TRAVEL | HOSPITALITY | 4722 | OTHER_TRAVEL |
| TRAVEL | MOBILITY_SERVICES | 4722 | OTHER_TRAVEL |
| TRAVEL | OTHER_TRAVEL | 4722 | OTHER_TRAVEL |
| UTILITIES | UTILITY_BILL_PAYMENT | 6012 | WALLETS |
| UTILITIES | UTILITY_PREPAID | 6012 | WALLETS |
| CRYPTO | CRYPTO_RESELLER | 6051 | CRYPTO_EXCHANGE |
| CRYPTO | CRYPTO_EXCHANGE | 6051 | CRYPTO_EXCHANGE |
| OTHER_INDUSTRIES | OTHER_INDUSTRIES | 5999 | OTHER_INDUSTRIES |
| OTHER_INDUSTRIES | REFERRAL_PARTNER | 7311 | DATING |
| OTHER_INDUSTRIES | EDUCATION | 8299 | EDUCATION |
| OTHER_INDUSTRIES | GOVERNMENT | 9399 | GOVERNMENT |
| OTHER_INDUSTRIES | REAL_ESTATE_HOUSING | 6513 | REAL_ESTATE_HOUSING |
| OTHER_INDUSTRIES | HEALTHCARE | 8099 | HEALTHCARE |