Prysym (1.0)

Introduction

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).

Authenticate

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:

Errors

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:

  • 1xx: Informational - Communicates transfer protocol-level information
  • 2xx: Success - Indicates that the client’s request was accepted successfully.
  • 3xx: Redirection - Indicates that the client must take some additional action in order to complete their request.
  • 4xx: Client Error - This category of error status codes points the finger at clients.
  • 5xx: Server Error - The server takes responsibility for these error status codes.
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.

Payment Instruments

Payment Instruments

Create payment instrument

This optional API endpoint securely saves customer card details and returns a unique identifier (token) that can be used for subsequent transaction processing

Request Body schema: application/json
One of
  • CardPaymentInstrumentRequest
  • CheckPaymentInstrumentRequest
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

Responses

200

OK

post /payment_instruments/create
https://api.prysym.com/v1/payment_instruments/create
https://api.sandbox.prysym.com/v1/payment_instruments/create

Request samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "type": "CARD",
  • "holder_name": "string",
  • "number": "stringstrings",
  • "expiration":
    {
    },
  • "reference": "string",
  • "associationName": "string",
  • "billing":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "type": "string",
  • "holder_name": "string",
  • "number_last4": "string",
  • "expiration":
    {
    },
  • "billing":
    {
    },
  • "association_name": "string",
  • "check_name": "string",
  • "check_aba": "string",
  • "check_account": "string",
  • "account_holder_type": "business",
  • "account_type": "checking",
  • "sec_code": "PPD"
}

Update payment instrument

This optional API endpoint securely update customer card details and returns a unique identifier (token) that can be used for subsequent transaction processing

Request Body schema: application/json
One of
  • PaymentInstrumentUpdateRequest
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

Responses

200

OK

post /payment_instruments/update
https://api.prysym.com/v1/payment_instruments/update
https://api.sandbox.prysym.com/v1/payment_instruments/update

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
  • "holder_name": "string",
  • "number": "stringstrings",
  • "expiration":
    {
    },
  • "billing":
    {
    },
  • "reference": "string",
  • "association_name": "string",
  • "check_name": "string",
  • "check_aba": "string",
  • "check_account": "string",
  • "account_holder_type": "string",
  • "account_type": "string",
  • "sec_code": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "type": "string",
  • "holder_name": "string",
  • "number_last4": "string",
  • "expiration":
    {
    },
  • "billing":
    {
    },
  • "association_name": "string",
  • "check_name": "string",
  • "check_aba": "string",
  • "check_account": "string",
  • "account_holder_type": "business",
  • "account_type": "checking",
  • "sec_code": "PPD"
}

Retrieve payment instrument

This API endpoint retrieves the details of previously saved card information associated with a unique identifier (token).

Request Body schema: application/json
id
required
string

ID of the object

Responses

200

OK

post /payment_instruments/get
https://api.prysym.com/v1/payment_instruments/get
https://api.sandbox.prysym.com/v1/payment_instruments/get

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "type": "string",
  • "holder_name": "string",
  • "number_last4": "string",
  • "expiration":
    {
    },
  • "billing":
    {
    },
  • "association_name": "string",
  • "check_name": "string",
  • "check_aba": "string",
  • "check_account": "string",
  • "account_holder_type": "business",
  • "account_type": "checking",
  • "sec_code": "PPD"
}

Acquiring

Prysym's Acquiring functionality

Process transaction

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.

Request Body schema: application/json
One of
  • CardRequest
  • ACHRequest
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

Responses

200

OK

post /acquiring/process
https://api.prysym.com/v1/acquiring/process
https://api.sandbox.prysym.com/v1/acquiring/process

Request samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "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":
    {
    },
  • "payment_instrument":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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 transaction

Capture – a transaction that is used to submit for settlement a previously approved Authorization.

Request Body schema: application/json
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

Responses

200

OK

post /acquiring/capture
https://api.prysym.com/v1/acquiring/capture
https://api.sandbox.prysym.com/v1/acquiring/capture

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "program_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
  • "type": "CAPTURE",
  • "originaltransaction_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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 transaction

Refund – a transaction that is used to credit funds to the account holder.

Request Body schema: application/json
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

Responses

200

OK

post /acquiring/refund
https://api.prysym.com/v1/acquiring/refund
https://api.sandbox.prysym.com/v1/acquiring/refund

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "program_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
  • "type": "REFUND",
  • "amount": "12.00",
  • "originaltransaction_id": "string",
  • "reference": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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 transaction

Void – a transaction that is used to cancel or fully reverse a previous transaction.

Request Body schema: application/json
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

Responses

200

OK

post /acquiring/void
https://api.prysym.com/v1/acquiring/void
https://api.sandbox.prysym.com/v1/acquiring/void

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "program_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
  • "type": "VOID",
  • "reference": "string",
  • "originaltransaction_id": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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"
}

Response codes

List the status codes and status Code Description

Request Body schema: application/json
program_id
required
string <uuid>

Program Id provided

codes
Array of strings

List of codes

Responses

200

OK

post /acquiring/response-codes
https://api.prysym.com/v1/acquiring/response-codes
https://api.sandbox.prysym.com/v1/acquiring/response-codes

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "program_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
  • "codes":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Last call

Response of last api call

Request Body schema: application/json
program_id
required
string <uuid>

Program Id provided

reference
required
string

Reference

Responses

200

OK

post /acquiring/last-call
https://api.prysym.com/v1/acquiring/last-call
https://api.sandbox.prysym.com/v1/acquiring/last-call

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "program_id": "c9bc8528-ce3b-49f0-8b18-e72b2c71ae6c",
  • "reference": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Transactions

Prysym's Transactions functionality allows you to manage transactions.

Retrieve transaction

This API endpoint allows to retrieve transaction details using a unique transaction identifier (ID)

Request Body schema: application/json
id
required
string

ID of the object

Responses

200

OK

post /v2/transactions/get
https://api.prysym.com/v1/v2/transactions/get
https://api.sandbox.prysym.com/v1/v2/transactions/get

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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":
    {
    },
  • "refunded_amount": "string"
}

List transactions

This API endpoint retrieves a list of transactions associated with a specified merchant, allowing for various filters to be applied

Request Body schema: application/json
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

Responses

200

OK

post /v1/transactions/list
https://api.prysym.com/v1/v1/transactions/list
https://api.sandbox.prysym.com/v1/v1/transactions/list

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "offset": "0",
  • "limit": "20",
  • "filters":
    {
    },
  • "sort":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    [
    ],
  • "paging":
    {
    }
}

Webhooks

Webhook Verification

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.

Webhook Verification Steps

1. Extract Required Data

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.

2. Generate the HMAC Signature

Generate an HMAC signature using the same secret key in different programming languages:

Kotlin
fun generateHmacSignature(body: ByteArray, secret: String): String { val hmacSha256Algorithm = "HmacSHA256" val sha256hMac = Mac.getInstance(hmacSha256Algorithm) sha256hMac.init(SecretKeySpec(secret.toByteArray(), hmacSha256Algorithm)) return Base64.getEncoder().encodeToString(sha256hMac.doFinal(body)) }
Java
public String generateHMACSignature(String secretKey, String message) { Mac sha256_HMAC = Mac.getInstance("HmacSHA256"); SecretKeySpec secret_key = new SecretKeySpec(secretKey.getBytes(), "HmacSHA256"); sha256_HMAC.init(secret_key); byte[] hmac = sha256_HMAC.doFinal(message.getBytes()); return Base64.getEncoder().encodeToString(hmac); }
.NET (C#)
public string GenerateHmacSignature(byte[] body, string secret) { string hmacSha256Algorithm = "HmacSHA256"; using (var sha256HMac = new HMACSHA256(Encoding.UTF8.GetBytes(secret))) { return Convert.ToBase64String(sha256HMac.ComputeHash(body)); } }
Go
func generateHmacSignature(body []byte, secret string) string { h := hmac.New(sha256.New, []byte(secret)) h.Write(body) return base64.StdEncoding.EncodeToString(h.Sum(nil)) }
Python
def generate_hmac_signature(body: bytes, secret: str) -> str: hmac_sha256_algorithm = 'sha256' sha256_hmac = hmac.new(secret.encode(), body, hashlib.sha256) return base64.b64encode(sha256_hmac.digest()).decode()
JavaScript (Node.js)
const crypto = require('crypto');

function generateHMACSignature(secretKey, message) { const hmac = crypto.createHmac('sha256', secretKey); hmac.update(message); return hmac.digest('base64'); }

Info Point:

  1. Algorithm: HMAC-SHA256

  2. Parameter input:

  • body - The raw payload received in the webhook (as a byte array).
  • secret - The shared secret key.
3. Compare the Signatures

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

Register Webhook

This API endpoint register webhook

Request Body schema: application/json
url
required
string <uuid>

URL

merchant_id
required
string <uuid>

Merchant id

secret_key
required
string [ 20 .. 100 ] characters

Secret Key

Responses

200

OK

post /webbhooks/register
https://api.prysym.com/v1/webbhooks/register
https://api.sandbox.prysym.com/v1/webbhooks/register

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "url": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
  • "merchant_id": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
  • "secret_key": "stringstringstringst"
}

Update Webhook

This API updates webhook url or secret

Request Body schema: application/json
url
string <uuid>

URL

secret_key
string [ 20 .. 100 ] characters

Secret Key

Responses

200

OK

post /webbhooks/update/{merchantId}
https://api.prysym.com/v1/webbhooks/update/{merchantId}
https://api.sandbox.prysym.com/v1/webbhooks/update/{merchantId}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "url": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
  • "secret_key": "stringstringstringst"
}

Webhook retry

This API retry webhook by event id

Request Body schema: application/json
url
string <uuid>

URL

secret_key
string [ 20 .. 100 ] characters

Secret Key

Responses

200

OK

post /webbhooks/retry/{eventId}
https://api.prysym.com/v1/webbhooks/retry/{eventId}
https://api.sandbox.prysym.com/v1/webbhooks/retry/{eventId}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "url": "3a532e3b-4a1c-42f9-8066-f7d262f6e644",
  • "secret_key": "stringstringstringst"
}

List Webhooks

This API endpoint retrieves a list of webhooks

Request Body schema: application/json
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

Responses

200

OK

post /webhooks/list
https://api.prysym.com/v1/webhooks/list
https://api.sandbox.prysym.com/v1/webhooks/list

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "offset": "0",
  • "limit": "20",
  • "filters":
    {
    },
  • "sort":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    [
    ],
  • "paging":
    {
    }
}