| PARAM | DESCRIPTION |
|---|---|
| user_id (required) | The ID of the user creating the payment order. |
| external_id | A unique external identifier for the transaction |
| payment_type (required) | The type of payment the user intends to use. Allowed values: card, paypal, psd2, transfer or latam methods given in get payment methods endpoint |
| fiat_symbol (required) | Ex: EUR, ARS |
| fiat_amount (required) | The amount in fiat currency that the user will pay. |
| coin_symbol (required) | The cryptocurrency symbol for the transaction (USDT). |
| coin_chain (required) | The blockchain of the selected cryptocurrency. Not needed for latam |
| wallet (required) | Address of the wallet where will receive the crypto |
| callback_url | The URL to be redirected after payment process |
Response when payment_type is "card" or "psd2"
{
"status": "success",
"message": "payment_created",
"data": {
"url_payment": "https://demo.cryptopocket.io/gateway/psd2?token=cef81d38-aa31-4f2d-a227-66b1cede5f61",
"payment_id": "9NM6ICl2KDaUiMtkDm4JSTqdQ"
}
}
Response when payment_type is "transfer"
{
"status": "sucess",
"message": "payment_created",
"data": {
"payment_id": "Fx1ZjLOkQGdPHr1u8Rsy9JvTh",
"iban": "ES6867130002530016234794",
"bic": "PFSSESM1XXX",
"concept": 120037,
"destination_name": "Fintech Payments, S.L"
}
}
curl --location --request POST '/api/createPayment' \
--header 'auth;' \
--header 'Content-Type: application/json' \
--data-raw '{
"user_id":106,
"external_id":"23232323231",
"payment_type":"KHIPU",
"fiat_symbol": "ARS",
"fiat_amount":240,
"coin_symbol":"ETH",
"coin_chain":"polygon",
"wallet":"0xB51b2ce243bb1F88880bC8D287EBbfd7F695Ac55"
}'{}