Public API Reference¶
API Overview¶
The base URL for all browser requests is https://payments.criptan.es/ The base URL for all API requests is https://payments-api.criptan.es/
All requests to the API must include a request header named authorization containing a valid API authorization token. A content-type request header must also be set, with value application/json.
All responses from the API include a common set of fields indicating the status and success of the request. Examples:
Transfer¶
Create Transfer¶
Web browser redirection
HTTP request¶https://payments.criptan.es/ POST { "currency": "EUR", "amount": 100, "receiverAccount": "sales@company.com", "senderAccount": "user@personal.com", "externalOrderId": "fdbe66e4-c3e1-4c38-8a4b-5fb95c7411ca", "callbackUrlSuccess": "https://company.com/success" "callbackUrlError": "https://company.com/error" }![]()
![]()
API
API request¶curl -X POST https://payments-api.criptan.es/v1/transfer \ -H 'authorization: Bearer eac33631-e416-43f9-b8ad-cff3cc0ab16b' \ -H 'content-type: application/json' \ { "currency": "EUR", "amount": 100, "receiverAccount": "sales@company.com", "senderAccount": "user@personal.com", "externalOrderId": "fdbe66e4-c3e1-4c38-8a4b-5fb95c7411ca", "callbackUrlSuccess": "https://company.com/success", "callbackUrlError": "https://company.com/error", "receiverKycData: { "firstName": "John" "lastName": "Doe" "documents": [ { type: "identity-document", format: "png" data: "..." }, { type: "residence-proof", format: "pdf" data: "..." }, ] } }
Parameters available through API and Web
- currency - The currency in which the transfer is made.
- amount - The transfer’s amount of currency units.
- receiverAccount - Account ID/email address of the transfer recipient.
- senderAccount - Account ID/email address of the transfer sender.
- callbackUrlSuccess - (Optional) URL to which the user will be redirected in case of payment has been received successfully.
- callbackUrlError - (Optional) URL to which the user will be redirected in case of payment could not be received successfully.
Parameters available through API
firstName - Sender’s first name
lastName - Sender’s last name
type - Type of document. Values: identity-document, *residence-proof”.
format - Document format. Supported formats are: png, jpg, pdf.
data - Document contents in Base64 encoding.
API Response¶{ "success": true, "timestamp": 1587468224, "data": { "id": "271d2c17b7e0", "url": "https://payments.criptan.es/271d2c17b7e0", "status: "CREATED", "createdAt": 1587468224, "receiverKycData": "PROCESSING" } }
success - Whether or not the request was processed successfully.
timestamp - Unix time in seconds at which the request was processed.
id - The id of the transfer that was just created.
url - URL to which the transfer UI can be accessed.
status - Status of the transfer: CREATED, PENDING, CONFIRMED.
createdAt - Unix time in seconds at which the transfer was created.
receiverKycData - Status of the KYC verification process: PROCESSING, VALID, INVALID.
List Transfers¶
API
API request¶curl -X DELETE https://payments-api.criptan.es/v1/transfer \ -H 'authorization: Bearer eac33631-e416-43f9-b8ad-cff3cc0ab16b' \ -H 'content-type: application/json'API Response¶{ "success": true, "data": [ { "id": "19667833f055", "url": "https://payments.criptan.es/19667833f055", "status: "CANCELLED", "createdAt": 1587466284 }, { "id": "271d2c17b7e0", "url": "https://payments.criptan.es/271d2c17b7e0", "status: "CREATED", "createdAt": 1587468224, "receiverKycData": "ok" } ] }
- success - Whether or not the request was processed successfully.
- timestamp - Unix time in seconds at which the request was processed.
- id - The id of the transfer that was just created.
- url - URL to which the transfer UI can be accessed.
- status - Status of the transfer: CREATED, PENDING, CONFIRMED.
- createdAt - Unix time in seconds at which the transfer was created.
- receiverKycData - Status of the KYC verification process: PROCESSING, VALID, INVALID.
Cancel Transfer¶
API
API request¶curl -X DELETE https://payments-api.criptan.es/v1/transfer \ -H 'authorization: Bearer eac33631-e416-43f9-b8ad-cff3cc0ab16b' \ -H 'content-type: application/json' \ { "id": "271d2c17b7e1" }API Response¶{ "success": false, "timestamp": 1587468223, "errorMessage": "Resource could not be found" }
- success - Whether or not the request was processed successfully.
- timestamp - Unix time in seconds at which the request was processed.