Crypto APM
The Crypto APM enables consumers to pay directly with cryptocurrencies from their wallets.
Payment type | Crypto |
Payouts | Yes |
Processing currencies | All major fiat currencies |
Customer wallet currencies | USDT, BTC, ETH, LTC, XRP, USDC, BCH, EOS |
Refunds | Yes |
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:
Parameter | Format | Description |
---|---|---|
merchantid | 40 characters | Merchant identification nuymber assigned during account creation |
orderid | max. 40 characters | The field orderid is optional and exclusively for the merchant's convenience |
amount | digits 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 |
currency | 3 characters. ISO 4217 | The currency field contains the alpha-3 currency code for the transaction Links to ISO |
payment_method | 18 | payabl. Payment methods IDs |
signature | 40 characters | Signature Calculation |
country | 3 characters. ISO 3166-1 alpha-3 | Customer country |
language | 2 characters, ISO 639-1 | This 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" |
email | max. 50 characters | Customer email. An RFC 822 compliant email address |
firstname | max. 50 characters | Mandatory; First name of the customer |
lastname | max. 50 characters | Mandatory; Last name of the customer |
url_success | max. 255 characters starting with http or https | Successful transaction redirect URL |
url_failed | max. 255 characters starting with http or https | Failed transaction redirect URL |
url_return | max. 255 characters starting with http or https | URL 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¤cy=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¬ification_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 vianotification_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:
Parameter | Description |
---|---|
transactionid | payabl. internal transaction id. Please use this transaction id when referring to the transaction in communications with the payabl. team |
transid | The same as transactionid |
status | Transaction error code |
errormessage | Brief explanation of transaction decline reason (empty on success) |
errmsg | The same as errormessage |
amount | Transaction amount |
price | The same as amount |
orderid | Optional transaction identifier assigned by the merchant |
payment_method | Payment method ID |
redirect_url | URL for customer redirection to finalize the payment (URL encoded) |
user_id | Payment 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×tamp=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×tamp=1660132695&errormessage=&orderid=Payabl-Test
Notification fields reference:
Parameter | Description |
---|---|
transactionid | payabl. internal transaction id. Please use this transaction id when referring to the transaction in communications with the payabl. team |
type | Transaction type |
errorcode | Transaction error code (0 for success) |
errormessage | Brief explanation of transaction decline reason (empty on success) |
amount | Transaction amount |
orderid | Optional transaction identifier given by the merchant |
security | Signature to verify the authenticity of the notification. You can find more information here |
timestamp | Notification timestamp |
payment_state | Transaction 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 parameternotification_url
in the initial request topayment_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¤cy=EUR&orderid=Payabl-Test
With wallet details
Request example:
merchantid=gateway_test&amount=9.99¤cy=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¤cy=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
Updated 4 days ago