Шаг 2. Финализация платежа
После подтверждения суммы клиентом необходимо отправить запрос на завершение сделки.
Запрос:
curl -X POST https://api.creon.ae/v2/qr/{id}/pay \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
access_token: string (required) - Authorization: Bearer
{id}: uuid (required) - _id из ответа на запрос /qr
Разбор ответа:
-
Status 200: Successfully created a new payout deal.
-
Status 400: Invalid request, typically due to a missing or malformed parameter.
{ "error": "ERROR_ACCESS_TOKEN_INVALID", "message": "Access token is invalid.", "statusCode": 400 }
error: string (required)
message: string (required)
statusCode: number
- Status 401: Authentication failed. This may happen due to the following reasons:
- Authentication is required but not provided.
- The access token has expired.
{ "error": "ERROR_TOKEN_EXPIRED", "message": "Access token has expired.", "statusCode": 401 }
error: string (required)
message: string (required)
statusCode: number
- Status 403:
QR code format not supported right now.
{ "error": "ERROR_QR_CODE_NOT_SUPPORTED", "message": "This QR code not supported.", "statusCode": 403 }
error: string (required)
message: string (required)
statusCode: number
- Status 404:
QR code expired.
{ "error": "QR_CODE_EXPIRED", "message": "QR code expired.", "statusCode": 404 }
error: string (required)
message: string (required)
statusCode: number
- Status 405: No route found for this QR code.
{
"error": "ERROR_QR_NO_ROUTE_FOUND",
"message": "Routing for this currency not set.",
"statusCode": 405
}
error: string (required)
message: string (required)
statusCode: number
- Status 409:
Conflict occurred because a deal with the same invoice ID already exists.
{ "error": "TRANSACTION_ALREADY_EXISTS", "message": "Transaction with same invoiceId already exists.", "statusCode": 409 }
error: string (required)
message: string (required)
statusCode: number
- Status 500:
Project tariff not configured, pls contact with our support.
{ "error": "TARIFF_NO_FOUND", "message": "Project tariff not configured, pls contact with our support.", "statusCode": 500 }
error: string (required)
message: string (required)
statusCode: number
- Status 501:
Requested quote not found, pls contact with our support.
{ "error": "QUOTE_NOT_FOUND", "message": "Requested quote not found, pls contact with our support.", "statusCode": 501 }
error: string (required)
message: string (required)
statusCode: number