# document **Repository Path**: coinpal/docs ## Basic Information - **Project Name**: document - **Description**: Coinpal document - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-12-26 - **Last Updated**: 2023-05-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Introduction > Coinpal is a non-custodial cryptocurrency payment processing platform. Accept payments in a wide range of cryptos and get them instantly converted into a coin of your choice and sent to your wallet. # SDKs&Demo TODOS # Sandbox TODOS # Authentication TODOS ## To use the Coinpal API you should do the following: ##### 1 Sign up at merchant.coinpal.io ##### 2 Fill in your business information ##### 3 Generate an API key ## Standard e-commerce flow for Coinpal API: ##### 1 Please check whether the transaction currency is in the list we allow, if not, please convert it to the currency we need in time ##### 2 API - Call the "POST Create payment" method to create a payment and get the deposit address; ##### 3 UI - Ask a customer to send the payment to the generated deposit address; ##### 4 UI - A customer sends coins, Coinpal processes and exchanges them (if required), and settles the payment to your Outcome Wallet; ##### 5 API - You can get the payment status either via our IPN callbacks or manually, using "GET Payment Status" and display it to a customer so that they know when their payment has been processed. ##### 6 UI - You can see all of this information in your Account on Coinpal Merchant website. ## Payment API ### POST Create payment `https://pay.coinpal.io/gateway/pay/checkout` >Creates payment. With this method, your customer will be able to complete the payment without leaving your website. Data must be sent as a form-date payload. Sign String Make Rule > sign = sha256(secretKey+requestId+merchantNo+orderNo+orderAmount+orderCurrency) Parameters Body | Name | Max Length | Mandatory | Default Value |Description | | ---- | ---- | ---- | ---- | ---- | | version | 10 | Yes | 2 | version No | | requestId | 156 | Yes | | Request serial number, each request needs to be unique | | merchantNo | 64 | Yes | | Merchant number | | merchantName | 256 | No | | Merchant name on the cashier page | | orderNo | 256 | Yes | | Merchant order number | | orderCurrencyType | 16 | Yes | | Currency type,either 'crypto' or 'fiat' | | orderCurrency | 10 | Yes | | Order currency | | orderAmount | 16 | Yes | | Order amount | | orderDescription | 256 | No | | Order description | | resultNotifyUser | 10 | No | true | Whether coinpal sends the final confirmation result of transaction for the user | | unpaidAutoRefund | 10 | No | true | Whether coinpal automatic refund is required in case of underpayment or overpayment | | payerEmail | 256 | No | | Payer email | | payerIP | 256 | Yes | | Payer Ip | | notifyURL | 256 | Yes | | Merchant asynchronous notification address | | redirectURL | 256 | Yes | | After the user pays successfully or the payment expires, the page will call back the address | | cancelURL | 256 | No | | After the user clicks Payment Cancel, the page will call back the address. If no value is passed, the default callback is to redirectUR | | successUrl | 256 | No | | The redirectURL will be used by default if the redirect address is blank | | remark | 500 | No | | The redirectURL will be used by default if the redirect address is blank | | sign | 64 | Yes | | The extension field can be defined by the merchant. After successful payment, it will be returned as is | Response Body (Success) | Name | Max Length | Mandatory | Default Value |Description | | ---- | ---- | ---- | ---- | ---- | | version | 10 | Yes | 2 | version No | | requestId | 156 | Yes | | Request serial number, each request needs to be unique | | merchantNo | 64 | Yes | | Merchant number | | orderNo | 256 | Yes | | Merchant order number | | reference | 256 | Yes | | Coinpal order number | | orderCurrency | 10 | Yes | | Order currency | | orderAmount | 16 | Yes | | Order amount | | nextStep | 200 | Yes | redirect | Next step | | nextStepContent | 200 | Yes | | Checkout link | | status | 16 | Yes | | Order status | | respCode | 10 | Yes | 200 | Response code | | respMessage | 256 | Yes | success | Message info | | remark | 500 | Yes | | | Response Body (Error) | Fields | Max Length | Mandatory | Default Value |Description | | ---- | ---- | ---- | ---- | ---- | | respCode | 10 | Yes | | Response code | | respMessage | 256 | Yes | | Error info | Request Demo (PHP) ~~~~ When the payment status and payment amount change, we will notify your server in the form of asynchronous notification | Name | Max Length | Mandatory | Default Value |Description | | ---- | ---- | ---- | ---- | ---- | | version | 10 | Yes | 2 | version No | | requestId | 156 | Yes | | Request serial number, each request needs to be unique | | merchantNo | 64 | Yes | | Merchant number | | orderNo | 256 | Yes | | Merchant order number | | reference | 256 | Yes | | Coinpal order number | | orderCurrency | 10 | Yes | | Order currency | | orderAmount | 16 | Yes | | Order amount | | dueCurrency | 16 | Yes | | Order due currency | | dueAmount | 16 | Yes | | Order due amount | | selectedWallet | 10 | Yes | | Wallet id | | paidCurrency | 10 | Yes | | Paid currency | | paidAmount | 16 | Yes | | Paid amount | | paidAddress | 10 | Yes | | Paid address | | confirmedTime | 20 | Yes | |Confirmed time| | status | 16 | Yes | | Order status | | remark | 500 | Yes | | | | notify_url | 256 | Yes | | Merchant asynchronous notification address | | sign | 64 | Yes | | | >sign = sha256(secretKey+requestId+merchantNo+orderNo+orderAmount+orderCurrency) ### Payment Status List Status List | Value | Description | | ---- | ---- | | unpaid | Order created successfully | | pending | Payment in progress | | partial_paid_confirming | partial paid successfully, to be confirmed by the public chain block | | partial_paid | partial paid successfully and the public chain block was confirmed | | paid_confirming | Paid successfully, to be confirmed by the public chain block | | paid | paid successfully and the public chain block was confirmed | | failed | Payment failed | ### Transaction Currency List | Currency | | ---- | | BTC | | ETH | | USDT | | USDC | | USD | | GBP | | EUR | | HKD |