Crypto APM

The Crypto APM enables consumers to pay directly with cryptocurrencies from their wallets.


Payment typeCrypto
PayoutsYes
Processing currenciesAll major fiat currencies
Customer wallet currenciesUSDT, BTC, ETH, LTC, XRP, USDC, BCH, EOS
RefundsYes

How to pay with the Crypto APM

  • The customer is redirected to hosted page where they are presented with the list of available cryptocurrencies and the converted amount.
  • They select their preferred cryptocurrency and are prompted to a page with a QR, the wallet address they can use for the transfer, and the amount to be transferred.
  • They execute the transfer (either by scanning the QR with their wallet or manually with the provided wallet address).
  • After they complete the payment, they will be redirected back to your shop or app.

General flow

POST Request -> to /payment_preauthorize
<- Response (direct, synchronous) with status=2000&errormessage=pending and redirect_url
Customer is redirected to redirect_url
<- Callback (asynchronous) with errorcode=0&payment_state=not_credited_yet to notification_url
<- Callback (asynchronous) with errorcode=0&payment_state=credited to notification_url


Step 1. Make a transaction request

From your server, make a POST /payment_preauthorize request.

POST https://sandbox.payabl.com/pay/backoffice/payment_preauthorize

Include in request:

ParameterFormatDescription
merchantid40 charactersMerchant identification nuymber assigned during account creation
orderidmax. 40 charactersThe field orderid is optional and exclusively for the merchant's convenience
amountdigits only, either no decimals or two decimal places (e.g.: 8 or 8.50)Transaction's total amount that will be deducted from the customer
currency3 characters. ISO 4217The currency field contains the alpha-3 currency code for the transaction Links to ISO
payment_method18payabl. Payment methods IDs
signature40 charactersSignature Calculation
country3 characters. ISO 3166-1 alpha-3Customer country
language2 characters, ISO 639-1This parameter determines the language in which the redirect pages (UI) will be shown (default is english). Valid values: "ja", "ru", "ko", "it", "ar", "en", "es", "fr", "m", "pt", "hi", "iw", "bg", "zh", "vi", "de", "tr"
emailmax. 50 charactersCustomer email. An RFC 822 compliant email address
firstnamemax. 50 charactersMandatory; First name of the customer
lastnamemax. 50 charactersMandatory; Last name of the customer
url_successmax. 255 characters starting with http or httpsSuccessful transaction redirect URL
url_failedmax. 255 characters starting with http or httpsFailed transaction redirect URL
url_returnmax. 255 characters starting with http or httpsURL for customer redirection

You can see the full list of parameters in Pre-Authorization

Request example:

merchantid=gateway_test&orderid=Payabl-Test&amount=19.99&currency=EUR&payment_method=18=en&customerip=2.22.75.244&[email protected]&language=de&firstname=John&lastname=Doe&zip=3035&street=Olympion&house=23&city=Limassol&country=CYP&url_return=https://yourshop.example/thank_you&notification_url=https://yourshop.example/notification&url_success=https://yourshop.example/payment_successful&url_failed=https://yourshop.example/payment_failed&signature=c50a9f6e6dfdd065a6fac48ccb24f654e28f5e18

🚧

Public Sandbox information

Do not use your personal email address, Order ID with sensitive information, real customer details and credit card data in the public Sandbox. For email field you may use [email protected].

📘

Redirection to url_return does not confirm that the transaction is successful. Always check the transaction via notification_url or use the diagnose interface to get the final status of the transaction.

Step 2. Handle the redirect

To complete the payment, you need to redirect the customer to the correct URL in the response.

Response example:

transactionid=104579097&transid=104579097&status=2000&errormessage=pending&errmsg=pending&amount=19.99&price=19.99&orderid=Payabl-Test&payment_method=116&redirect_url=https%3A%2F%2Fsandbox.payabl.com%2Fpay%2F73b4
08a26b3a06968cf3234140da43b6e803e574%2Fpayment%2Fredirect_to_bank&user_id=504459

Response fields reference:

ParameterDescription
transactionidpayabl. internal transaction id. Please use this transaction id when referring to the transaction in communications with the payabl. team
transidThe same as transactionid
statusTransaction error code
errormessageBrief explanation of transaction decline reason (empty on success)
errmsgThe same as errormessage
amountTransaction amount
priceThe same as amount
orderidOptional transaction identifier assigned by the merchant
payment_methodPayment method ID
redirect_urlURL for customer redirection to finalize the payment (URL encoded)
user_idPayment system user identifier

After the client completed the payment, they will be redirected back to your url_return.
Additionally, you will get a notification to provided notification_url, which should be used to update statuses in your system.

Step 3. Receive the final status

Once the customer completes the payment, we will send a notification with the transaction's final status to the notification_url specified by you.

url_return and notification_url should be passed by you in the Pre-authorization request.

Alternatively, you can communicate a notifciation_url to be used by default to payabl. technical team. By doing so, you won't need to send it in every request.

Notifications contain an additional notification parameter which is payment_state, which can contain the following values:

  • not_credited_yet: Capture - Accepted.
  • credited: Capture - Successful.
  • not_credited: Capture - Failed.

Each state change would trigger a notification to the notification URL, notification URL is the URL that was provided when the merchant account was created.

Notification example - Accepted Capture:

transactionid=104579096&security=32ffe6f775a31a3ef694725bd8e9acd50e1e3345f57f11416b417e7a6505f1e9&timestamp=1660132694&
errormessage=&errorcode=0&orderid=Payabl-Test&type=capture&amount=19.99&payment_state=not_credited_yet

Notification example - Successful Capture:

errorcode=0&transactionid=104579096&amount=19.99&type=capture&security=c9ec2d956a532f2c5e5e2c2fb2edc084e4b2df8e45a1fea
36fd6500cd47849ac&payment_state=credited&timestamp=1660132695&errormessage=&orderid=Payabl-Test

Notification fields reference:

ParameterDescription
transactionidpayabl. internal transaction id. Please use this transaction id when referring to the transaction in communications with the payabl. team
typeTransaction type
errorcodeTransaction error code (0 for success)
errormessageBrief explanation of transaction decline reason (empty on success)
amountTransaction amount
orderidOptional transaction identifier given by the merchant
securitySignature to verify the authenticity of the notification. You can find more information here
timestampNotification timestamp
payment_stateTransaction acceptance state as described above

When the customer finished or canceled the payment, he will be redirected back to url_return, provided by you in the initial request to payment_preauthorize. After that, you will receive a notification, posted to notification_url, with the final transaction status, which you suppose to use to update your system.

📘

Notification URL can be configured by our tech support team in your account on our side,
or you can send it as a parameter notification_url in the initial request to payment_preauthorize.

📘

In case 15 days pass and payabl. didn't receive any funds from an issuer, the transaction will be failed automatically. You will receive a notification update.


Payouts

The Crypto APM allows merchants to send funds to any wallet.

This is a server-to-server API request with no callbacks/webhooks.

POST https://sandbox.powercash21.com/pay/backoffice/payment_cft

The payout request through the Crypto APM can be done in two ways:

  • Payout based on an existing transaction
  • With consumer wallet details.

Based on an existing transaction

The merchant can choose an existing successful deposit or CFT transaction ID to automatically extract the account details for payouts.

Request example:

merchantid=gateway_test&amount=9.99&coin_wallet_address=0xB914e7a612casd335DeD&payment_method=18&transactionid=104579097&signature=fbb556b32974892ce3c13f231db7e3ec6acf76f7

After you send a payout request, the system will validate your current balance. If your balance is sufficient then the transaction will be sent for processing.

payabl. will send you a response letting you know if the payout was successful or not.

Response example:

transactionid=105159142&transid=105159142&status=2000&errormessage=pending&errmsg= pending&amount=9.99&price=9.99&currency=EUR&orderid=Payabl-Test

With wallet details

Request example:

merchantid=gateway_test&amount=9.99&currency=EUR&payment_method=18& coin_wallet_address=0xB914e7a612casd335DeD&signature=c9e4259d5b640210f21e248b7dfdc7894afa2b80

payabl. will send you a response.

Response example:

transactionid=105159149&transid=105159149&status=2000&errormessage= pending&errmsg= pending&amount=9.99&price=9.99&currency=EUR&orderid=Payabl-Test&payment_method=18

In both cases after processing the payout, a notification will be sent to the provided Notification URL so that you can flag the payout as success in your system. Note that the notification will be sent AFTER the synchronous response has been sent.

Failed payouts

In case an error occurs when processing the payout, a notification will be sent to the provided Notification URL so that you can flag the payout as failed in your system. Note that the notification will be sent AFTER the synchronous response has been sent.

Failed notification example:

type=cft&security=48b2a585ef95beb5d07b0f752d61cb09ec8e1985&errormessage=MID+is+near+to+negative+balance&orderid=Payabl-Test&errorcode=-6209&captured_amount=0&transactionid=105159138