Direct API Step 1
Last updated
Last updated
1- To obtain the iFrame Token, send the specified information in the table to the relevant URL using the POST method: https://app.coinpays.io/api/create-payment
This request occurs in the background (server-side) using the POST method.
1) The customer starts a new order on the merchant webpage.
2) Merchant redirects the customer to the page where the payment options are presented.
3) After the customer inputs and confirms the information for the payment, the merchant should produce a security token. The data to be used in token production is listed below. Please check sample codes for clarification on token production.
Value | Type | Mandatory | Description | Limitation |
---|---|---|---|---|
Successful response example: (includes iframe_token)
IMPORTANT: Upon completion of the steps described above, the payment form should appear on the screen. This step concludes the part of the payment process which the user will interact with. HOWEVER; the integration is not yet complete. STEP 2 must be completed in order to receive the payment result (success / failed) and to confirm / cancel the order. To complete the integration, please see the document inside STEP 2 folder.
Example Request Link:
https://app.coinpays.io/api/set-completed-test?token=ODlicWtiTVNxaDJpTFdqRzZjbC9aVWVqc0g0Mm9JRUUyR2VWVHpsNGRqWT0=&merchant_id=064853&merchant_key=BTlCIOP8eGzNK4wg&merchant_salt=HQDj6a0VVWsetohQ&merchant_oid=1714820463
Value | Type | Description | |
---|---|---|---|
merchant_id
string
Your Merchant ID
user_ip
string
User IP received during the request (Important: Make sure you send the external IP address when you run tests on your local machine)
IPV4/IPV6
merchant_oid
string
The unique order id you set for the transaction. (Note: Order number is posted back within callback notification - on STEP 2)
Up to 64 characters, Alpha numeric
string
The email address which; a) the user registered with on your system b) or you received via the order form
Up to 100 characters
payment_amount
integer
The total amount of the order. (Multiply the amount by 100)
*For example, 3456 should be sent for 34.56 (34.56 100 = 3456)**
currency
string
Currency
TL, EUR, USD, GBP, RUB. For mor info, check github files
user_basket
string
User basket/order contents
Please check the sample codes for structure
lang
string
Language to be used on pages during payment process
tr,en,kr,jp... For more info please check this link.
coinpays_token
string
It is used to ensure that the request comes from you and the content did not change
Please check the sample codes for calculation
user_name
string
First and last name of the user that you have on your system or received via the order form
Up to 60 characters
user_address
string
The address of the user that you have on your system or received via the order form
Up to 200 characters
user_phone
string
The phone number of the user that you have on your system or received via the order form
Up to 20 characters
merchant_pending_url
string
The page to which the user is directed after payment (e.g. order status / my orders page) (Warning: payment may not have been confirmed yet when the user reaches this page)
Up to 200 characters
test_mode
integer
Can be sent as 1 for testing when the store is in live mode
0 or 1
coin
string
Crypto token code to be used
ETH,BTC,XRP,etc.. You
network
string
Crypto token network to be used
ERC-20,BEP-20,AREON, etc..
token
string
Unique token of payment
merchant_oid
string
Up to 64 characters, Alpha numeric
merchant_id
string
Your Merchant ID
merchant_key
string
Your Merchant API Key
merchant_salt
string
Your Merchant API Salt