Iframe API Step 1
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/get-token
This request occurs in the background (server-side) using the POST method.
Values to be sent in the POST REQUEST content:
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
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
The response to the iframe_token request is in JSON format:
Successful response example: (includes iframe_token)
The following HTML code block should be used to open the payment form. The iframe_token received in the successful response (explained above) is used in “src” attribute of iFrame.
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.
Last updated