Hosted Checkout Page Integration
Users can scan the QR code or copy the address on the hosted checkout page to make the payments.
We recommend merchants to integrate with ReelPay's hosted checkout interface. You will only need two steps to start accepting crypto payments. When the integration is done. Your server will be able to call the checkout URL API and present ReelPay's hosted checkout page to your users.

Step 1: Get Checkout URL
Return a Checkout URL
POST https://pay.reelpay.com/v1/transactions/entrust
Headers
X-Timestamp*
String
Timestamp in seconds (10-digit). The request is valid for two minutes.
content-type*
String
application/json
Request Body
symbol*
String
Amount should be paid for this order (in USD by default, no more than two digits after the dot)
out_trade_no*
String
Order ID in Merchant's system
name*
String
Name of the product
image
String
The URL address of the product image
amount
String
Product Price
Response
Header
X-Timestamp
1677152490
Y
string
Timestamp in seconds (10-digit). The request is valid for two minutes.
X-Sign
e0b78d93fd702aa31b07d5488cd85b4b7176d01c4ec45fd8bfaef0d1081a5ead
Y
string
hmacSHA256 (body (json string)+timestamp+appKey). Signature guide.
content-type
application/json
Y
string
Body
{
"code": 200,
"message": "success",
"data": {
"url": "https://pay.reelpay.com/b79d2586ef7807d18c20230725183439",
"time_expire": 1690389279,
"trade_no": "b79d2586ef7807d18c20230725183439"
}
}Parameters
code
200
Integer
message
success
String
data
Object
data.time_expire
1690389279
Integer
data.trade_no
b79d2586ef7807d18c20230725183439
String
ReelPay Order ID
As a security measure, we will sign the returned data (and according to this only { code: 200 } should be signed, but it's signing all the returned body.). Additionally, it will return Appid, Sign, Timestamp in the header of the response. The signature method hmacSHA256 (body (json string)+timestamp+appKey).
Please use the data with caution if the signature verification fails. It indicates that the data has been tampered with.
Request Body Example
{
"out_trade_no":"202307250001",
"symbol":"USD",
"amount":"100",
"name":"product name",
"image":"https://reelpay.com/product.jpg"
}The body of HTTP is a json string .
Add the content in body of HTTP to the signature. Ensure the body content matches the signature content. As soon as ReelPay receives the request, the body content will be read and the signature will be verified.
SDK Example
import (
reelpay "github.com/ReelPayment/sdk-go"
)
func main() {
transaction := reelpay.Transactions{
AppID: "eqrbntqbi5uqvkpr",
AppKey: "XhAlbICW10VJnWGruPL0NSnvb6946JDQ",
}
res := transaction.EntrustPay(&reelpay.EntrustPay{
OutTradeNo: "jSWfrolOTdsadcYuUwkJbdw9IJUBeV",
Symbol: "USD",
Amount: "1.2",
Name: "Product name",
Image: "https://reelpay.com/product.jpg",
})
fmt.Println(res)
}Step 2: Configure Webhook to receive payout notification
Configure Webhook to receive notifications. ReelPay will notify merchant of the final transaction results. You can configure the Webhook URL on the AppManage page
Transactions will start a request to the callback interface set by the merchant when involving the following events:
Paid
Transaction close
Transaction timeout
Refunded
Chain confirmation failed
Callback Frequency: 5s、15s、30s、3m、10m、20m、30m、30m、30m、60m、3h、3h、3h、6h、6h
Total: 24h3m50s
Callback Form:
The callback content is still encrypted.「For more information see the Signature」
Webhook notification
X-Timestamp
1690368283
Y
string
Timestamp in seconds (10-digit). The request is valid for two minutes.
X-Sign
e0c6a719ebc366da0340c1b450026a903a55c86ed5fbe0b586cd73f6be74ade6
Y
string
hmacSHA256 (body (json string)+timestamp+appKey)
```json
{
"trade_no": "uGHT9KRRvLIl4WW8JAaTWmETf3mz8D60",
"appid": "eqrbntqbi5uqvkpr",
"out_trade_no": "202307250001",
"amount": "1.2",
"status": "PAID",
"success_time": 1690369680
}
```
trade_no
string
ReelPay Order ID
appid
string
Merchant APPID
out_trade_no
string
Merchant Order ID
amount
string
Transaction Amount
status
string
Transaction Status
success_time
string
Transaction Time
Return Appid, Sign, Timestamp in the header of the response. The signature method hmacSHA256 (body (json string)+timestamp+appKey).
Please use the data with caution if the signature verification fails. It indicates that the data has been tampered with.
Example

Last updated
