The Prysym APIs are designed to enable clients to make and receive payments globally by quickly and easily integrating into their native systems without knowing how arcane payment systems work globally or even having many details about the recipient. We’ve integrated a combination of more common methods, new services as well novel techniques pioneered by the company representing the most diverse and ever expanding final-mile payment options possible. This enables the client to make an instant payment to anyone, anywhere and enables the recipient to decide the best way to access their money. (The above is subject to sanctions and regulated entity approvals).
To make API calls, include the bearer token in the Authorization header with the Bearer authentication scheme.
The value is Bearer <Your-Secret-Key>.
The URL to the API service is either:
Sandbox. https://api.sandbox.prysym.com
Live. https://api.prysym.com
APIs use the Status-Line part of an HTTP response message to inform clients of their request’s overarching result.
HTTP defines over 40 standard status codes that can be used to convey the results of a client’s request. The status codes are divided into the five categories presented here:
| Error Code | Error Description |
|---|---|
| UNAUTHORIZED | Missing or invalid API Key provided. |
| REQUEST_INVALID | The request provided is invalid. Please check details field for more details. |
| BALANCE_INSUFFICIENT | The operation could not be completed because the associated account does not have a sufficient balance available. |
This optional API endpoint securely saves customer card details and returns a unique identifier (token) that can be used for subsequent transaction processing
| type required | string Value: "CARD" |
| holder_name required | string Cardholder's full name. |
| number required | string [ 13 .. 16 ] characters Card number |
| expiration required | object |
| reference | string Reference |
| associationName | string Association name |
| billing required | object Billing information |
OK
{- "type": "CARD",
- "holder_name": "string",
- "number": "stringstrings",
- "expiration": {
- "month": "string",
- "year": "string"
}, - "reference": "string",
- "associationName": "string",
- "billing": {
- "address": {
- "country_code": "string",
- "country_subdivision_code": "string",
- "city": "string",
- "postal_code": "string",
- "line1": "string",
- "line2": "string"
}
}
}{- "id": "string",
- "type": "string",
- "holder_name": "string",
- "number_last4": "string",
- "expiration": {
- "month": "string",
- "year": "string"
}, - "billing": {
- "address": {
- "country_code": "string",
- "country_subdivision_code": "string",
- "city": "string",
- "postal_code": "string",
- "line1": "string",
- "line2": "string"
}
}, - "association_name": "string",
- "check_name": "string",
- "check_aba": "string",
- "check_account": "string",
- "account_holder_type": "business",
- "account_type": "checking",
- "sec_code": "PPD"
}This optional API endpoint securely update customer card details and returns a unique identifier (token) that can be used for subsequent transaction processing
| id required | string <uuid> Id |
| holder_name | string Cardholder's full name. |
| number | string [ 13 .. 19 ] characters Card number |
| expiration | object |
| billing | object Billing information |
| reference | string Reference |
| association_name | string Association name |
| check_name | string Check name |
| check_aba | string Check aba |
| check_account | string Check account |
| account_holder_type | string Account holder type |
| account_type | string Account type |
| sec_code | string Sec code |
OK
{- "id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "holder_name": "string",
- "number": "stringstrings",
- "expiration": {
- "month": "string",
- "year": "string"
}, - "billing": {
- "address": {
- "country_code": "string",
- "country_subdivision_code": "string",
- "city": "string",
- "postal_code": "string",
- "line1": "string",
- "line2": "string"
}
}, - "reference": "string",
- "association_name": "string",
- "check_name": "string",
- "check_aba": "string",
- "check_account": "string",
- "account_holder_type": "string",
- "account_type": "string",
- "sec_code": "string"
}{- "id": "string",
- "type": "string",
- "holder_name": "string",
- "number_last4": "string",
- "expiration": {
- "month": "string",
- "year": "string"
}, - "billing": {
- "address": {
- "country_code": "string",
- "country_subdivision_code": "string",
- "city": "string",
- "postal_code": "string",
- "line1": "string",
- "line2": "string"
}
}, - "association_name": "string",
- "check_name": "string",
- "check_aba": "string",
- "check_account": "string",
- "account_holder_type": "business",
- "account_type": "checking",
- "sec_code": "PPD"
}This API endpoint retrieves the details of previously saved card information associated with a unique identifier (token).
| id required | string ID of the object |
OK
{- "id": "string"
}{- "id": "string",
- "type": "string",
- "holder_name": "string",
- "number_last4": "string",
- "expiration": {
- "month": "string",
- "year": "string"
}, - "billing": {
- "address": {
- "country_code": "string",
- "country_subdivision_code": "string",
- "city": "string",
- "postal_code": "string",
- "line1": "string",
- "line2": "string"
}
}, - "association_name": "string",
- "check_name": "string",
- "check_aba": "string",
- "check_account": "string",
- "account_holder_type": "business",
- "account_type": "checking",
- "sec_code": "PPD"
}This API endpoint processes both Authorization and Purchase. Purchase - a transaction that is used to authorize and capture the amount in one transaction. Authorization – a transaction that is used to transmit an authorization request where it is not captured for settlement processing. A subsequent Capture transaction is then submitted to be captured for settlement processing.
| program_id required | string <uuid> Program Id provided |
| merchant_id required | string <uuid> Merchant unique id |
| terminal_id | string <uuid> Terminal id |
| card_holder_ip | string Card holder ip |
| currency_code required | string ISO 3-letter country code |
| type required | string Enum: "AUTHORIZATION" "PURCHASE" "VERIFICATION" Type of transaction |
| amount required | number <double> Transaction amount. Length 12 including .00 and min 0.00 - max 9999999999.99 |
| reference | string [ 1 .. 48 ] characters Merchant unique transaction reference number |
| stored_payment_instrument | object Either stored_payment_instrument or payment_instrument details are required |
| payment_instrument | object Either stored_payment_instrument or payment_instrument details are required |
OK
{- "program_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "merchant_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "terminal_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "card_holder_ip": "string",
- "currency_code": "USD",
- "type": "AUTHORIZATION",
- "amount": "12.00",
- "reference": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "stored_payment_instrument": {
- "id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "security_code": "strin"
}, - "payment_instrument": {
- "holder_name": "string",
- "number": "348573250840854",
- "expiration_date": "string",
- "security_code": "strin",
- "billing": {
- "address": {
- "country_code": "US",
- "country_subdivision_code": "string",
- "city": "string",
- "postal_code": "string",
- "line1": "string",
- "line2": "string"
}
}, - "association_name": "Amex"
}
}{- "id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "program_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "merchant_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "terminal_id": "string",
- "currency_code": "USD",
- "amount": "12.00",
- "type": "AUTHORIZATION",
- "status": "COMPLETED",
- "reference": "string",
- "payment_instrument_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "originaltransaction_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "auth_id": "string",
- "bank_net_data": "string",
- "fd_terminal_id": "string",
- "status_code": "string",
- "status_desc": "string",
- "avs_result_code": "string",
- "response_date": "string",
- "addtl_resp_data": "string",
- "sttlm_date": "string",
- "ath_ntwk_id": "string",
- "ath_ntwk_nm": "string",
- "rt_ind": "string",
- "sig_ind": "string",
- "ccv_result_code": "string",
- "error_data": "string",
- "debit_trace_num": "string",
- "ath_ntwk_trc_id": "string",
- "settlement_txn_type": "string",
- "print_data": "string",
- "assoc_resp_code": "string",
- "created_at": "2020-01-08"
}Capture – a transaction that is used to submit for settlement a previously approved Authorization.
| program_id required | string <uuid> Program Id provided |
| type required | string Value: "CAPTURE" |
| originaltransaction_id required | string <uuid> Transaction Id provided for original authorization transaction |
OK
{- "program_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "type": "CAPTURE",
- "originaltransaction_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c"
}{- "id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "program_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "merchant_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "terminal_id": "string",
- "currency_code": "USD",
- "amount": "12.00",
- "type": "AUTHORIZATION",
- "status": "COMPLETED",
- "reference": "string",
- "payment_instrument_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "originaltransaction_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "auth_id": "string",
- "bank_net_data": "string",
- "fd_terminal_id": "string",
- "status_code": "string",
- "status_desc": "string",
- "avs_result_code": "string",
- "response_date": "string",
- "addtl_resp_data": "string",
- "sttlm_date": "string",
- "ath_ntwk_id": "string",
- "ath_ntwk_nm": "string",
- "rt_ind": "string",
- "sig_ind": "string",
- "ccv_result_code": "string",
- "error_data": "string",
- "debit_trace_num": "string",
- "ath_ntwk_trc_id": "string",
- "settlement_txn_type": "string",
- "print_data": "string",
- "assoc_resp_code": "string",
- "created_at": "2020-01-08"
}Refund – a transaction that is used to credit funds to the account holder.
| program_id required | string <uuid> Program Id provided |
| type required | string Value: "REFUND" |
| amount | number <double> Required for partial refund |
| originaltransaction_id required | string Transaction Id provided for original authorization transaction |
| reference | string Reference |
OK
{- "program_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "type": "REFUND",
- "amount": "12.00",
- "originaltransaction_id": "string",
- "reference": "string"
}{- "id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "program_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "merchant_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "terminal_id": "string",
- "currency_code": "USD",
- "amount": "12.00",
- "type": "AUTHORIZATION",
- "status": "COMPLETED",
- "reference": "string",
- "payment_instrument_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "originaltransaction_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "auth_id": "string",
- "bank_net_data": "string",
- "fd_terminal_id": "string",
- "status_code": "string",
- "status_desc": "string",
- "avs_result_code": "string",
- "response_date": "string",
- "addtl_resp_data": "string",
- "sttlm_date": "string",
- "ath_ntwk_id": "string",
- "ath_ntwk_nm": "string",
- "rt_ind": "string",
- "sig_ind": "string",
- "ccv_result_code": "string",
- "error_data": "string",
- "debit_trace_num": "string",
- "ath_ntwk_trc_id": "string",
- "settlement_txn_type": "string",
- "print_data": "string",
- "assoc_resp_code": "string",
- "created_at": "2020-01-08"
}Void – a transaction that is used to cancel or fully reverse a previous transaction.
| program_id required | string <uuid> Program Id provided |
| type required | string Value: "VOID" Is supported for Void of PURCHASE or REFUND |
| reference | string Reference |
| originaltransaction_id required | string Transaction Id provided for original authorization transaction |
OK
{- "program_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "type": "VOID",
- "reference": "string",
- "originaltransaction_id": "string"
}{- "id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "program_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "merchant_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "terminal_id": "string",
- "currency_code": "USD",
- "amount": "12.00",
- "type": "AUTHORIZATION",
- "status": "COMPLETED",
- "reference": "string",
- "payment_instrument_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "originaltransaction_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "auth_id": "string",
- "bank_net_data": "string",
- "fd_terminal_id": "string",
- "status_code": "string",
- "status_desc": "string",
- "avs_result_code": "string",
- "response_date": "string",
- "addtl_resp_data": "string",
- "sttlm_date": "string",
- "ath_ntwk_id": "string",
- "ath_ntwk_nm": "string",
- "rt_ind": "string",
- "sig_ind": "string",
- "ccv_result_code": "string",
- "error_data": "string",
- "debit_trace_num": "string",
- "ath_ntwk_trc_id": "string",
- "settlement_txn_type": "string",
- "print_data": "string",
- "assoc_resp_code": "string",
- "created_at": "2020-01-08"
}List the status codes and status Code Description
| program_id required | string <uuid> Program Id provided |
| codes | Array of strings List of codes |
OK
{- "program_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "codes": [
- "string"
]
}[- {
- "responseCode": "string",
- "responseCodeDescription": "string"
}
]Response of last api call
| program_id required | string <uuid> Program Id provided |
| reference required | string Reference |
OK
{- "program_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "reference": "string"
}[- {
- "id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "type": "string",
- "reference": "string",
- "createdTime": "2024-08-08",
- "transcationType": "string",
- "clientId": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "merchantId": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "transactionId": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "body": { },
- "error": "string"
}
]This API endpoint allows to retrieve transaction details using a unique transaction identifier (ID)
| id required | string ID of the object |
OK
{- "id": "string"
}{- "id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "payment_instrument_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "merchant_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "program_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "amount": "12.00",
- "currency_code": "USD",
- "status": "string",
- "created_at": "2024-08-08",
- "terminal_id": "string",
- "reference": "string",
- "type": "string",
- "originaltransaction_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "status_code": "string",
- "status_desc": "string",
- "bank_net_data": "string",
- "auth_id": "string",
- "ccv_result_code": "string",
- "avs_response": "string",
- "response_group": {
- "resp_code": "string",
- "auth_id": "string",
- "response_date": "string",
- "addtl_resp_data": "string",
- "sttlm_date": "string",
- "ath_ntwk_id": "string",
- "ath_ntwk_nm": "string",
- "rt_ind": "string",
- "sig_ind": "string",
- "error_data": "string",
- "debit_trace_num": "string",
- "ath_ntwk_trc_id": "string",
- "settlement_txn_type": "string",
- "print_data": "string",
- "assoc_resp_code": "string"
}, - "refunded_amount": "string"
}This API endpoint retrieves a list of transactions associated with a specified merchant, allowing for various filters to be applied
| offset | number <integer> The number of records to skip before starting to return results |
| limit | number <integer> The maximum number of records to return in the response |
| filters required | object Filters query results based on specified key-value pairs |
| sort | object Define the sorting order of results by specifying a column and direction |
OK
{- "offset": "0",
- "limit": "20",
- "filters": {
- "status": [
- "COMPLETED"
], - "amount": "10.8",
- "transaction_type": [
- "AUTHORIZATION"
], - "card_type": [
- "Amex"
], - "merchant_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "card_last4": "string",
- "name_on_card": "string",
- "authorization_code": "string",
- "stan": "string",
- "reference": "string",
- "id": "string",
- "transaction_date": {
- "from": "2024-08-08",
- "to": "2024-08-28"
}
}, - "sort": {
- "field": "20",
- "type": "ASC"
}
}{- "data": [
- {
- "id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "transaction_type": "AUTHORIZATION",
- "destination_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "amount": "12.00",
- "local_time": "2024-09-27T15:20:45.327",
- "transmission_time": "2024-09-27T15:20:45.327",
- "currency_code": "USD",
- "stan": "string",
- "reference": "string",
- "terminal_id": "123",
- "merchant_id": "123",
- "merchant_name": "string",
- "card_number": { },
- "pos_entry_mode": "string",
- "response_code": "string",
- "status": "string",
- "authorization_id": "string",
- "card_brand": [
- "Amex"
]
}
], - "paging": {
- "offset": "0",
- "limit": "20",
- "totalCount": "20"
}
}To secure Prysym webhook verification on the client side, it is essential to implement HMAC-based verification.
HMAC (Hash-based Message Authentication Code) is a cryptographic mechanism that combines a secret key with a hashing algorithm to generate a unique code for a given payload. This ensures:
Data Integrity: The payload has not been altered in transit.
Authentication: The message is from a trusted source.
Security: The secret key ensures that only parties with the key can generate valid HMACs.
Prysym use HMAC-SHA256 cryptographic algorithm with a shared secret key to generate the signature, which is sent in the x-webhook-hmac header of the webhook.
When receive the webhook
Retrieve the raw payload body of the HTTP POST request
Extract the x-webhook-hmac header from the request headers. This header contains the signature.
Generate an HMAC signature using the same secret key in different programming languages:
function generateHMACSignature(secretKey, message) { const hmac = crypto.createHmac('sha256', secretKey); hmac.update(message); return hmac.digest('base64'); }
Info Point:
Algorithm: HMAC-SHA256
Parameter input:
Compare the X-HMAC-Signature header value with the HMAC signature you computed:
If the signatures match, the webhook is valid and untampered.
If they do not match, reject the webhook as potentially malicious
This API endpoint register webhook
| url required | string <uuid> URL |
| merchant_id required | string <uuid> Merchant id |
| secret_key required | string [ 20 .. 100 ] characters Secret Key |
OK
{- "url": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "merchant_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "secret_key": "stringstringstringst"
}This API updates webhook url or secret
| url | string <uuid> URL |
| secret_key | string [ 20 .. 100 ] characters Secret Key |
OK
{- "url": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "secret_key": "stringstringstringst"
}This API retry webhook by event id
| url | string <uuid> URL |
| secret_key | string [ 20 .. 100 ] characters Secret Key |
OK
{- "url": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "secret_key": "stringstringstringst"
}This API endpoint retrieves a list of webhooks
| offset | number <integer> The number of records to skip before starting to return results |
| limit | number <integer> The maximum number of records to return in the response |
| filters required | object Filter request query |
| sort | object Define the sorting order of results by specifying a column and direction |
OK
{- "offset": "0",
- "limit": "20",
- "filters": {
- "success": "true",
- "merchant_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "webhook_date": {
- "from": "2024-08-08",
- "to": "2024-08-28"
}
}, - "sort": {
- "field": "20",
- "type": "ASC"
}
}{- "data": [
- {
- "created_at": "2024-09-27T15:20:45.327",
- "last_request_at": "2024-09-27T15:20:45.327",
- "retries": "3",
- "event_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "event_type": "string",
- "merchant_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
- "success": "true",
- "event_body": {
- "id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "programId": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "merchant_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "terminal_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "currency_code": "USD",
- "amount": "10.8",
- "type": "AUTHORIZATION",
- "status": "COMPLETED",
- "payment_instrument_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "originaltransaction_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
- "auth_id": "string",
- "fd_merchant_id": "string",
- "bank_net_data": "string",
- "fd_terminal_id": "string",
- "created_at": "2024-09-27T15:20:45.327",
- "status_code": "string",
- "status_desc": "string",
- "avs_result_code": "string",
- "ccv_result_code": "string",
- "response_date": "string",
- "addtl_resp_data": "string",
- "sttlm_date": "string",
- "ath_ntwk_id": "string",
- "ath_ntwk_nm": "string",
- "rt_ind": "string",
- "sig_ind": "string",
- "error_data": "string",
- "debit_trace_num": "string",
- "ath_ntwk_trc_id": "string",
- "settlement_txn_type": "string",
- "print_data": "string",
- "assoc_resp_code": "string"
}
}
], - "paging": {
- "offset": "0",
- "limit": "20",
- "totalCount": "20"
}
}