Create Payin Order¶
Creates a new payin order.
Payin Order
A payin order is a payin operation created for a merchant gate payment method. Payin orders represent incoming funds from an external source to a merchant or gate balance.
Idempotency
Idempotency prevents duplicate payment requests by using the unique reference_id value.
Each reference_id should identify one payment request and must be unique within the merchant context. If the same reference_id is submitted again for the same context, the system can detect the request as a duplicate.
Use a newly generated UUID or another stable unique value for each new payment request, especially when generating reference_id values automatically.
Endpoint¶
POST /api/v1/orders/payin
/api/v1/orders/payin
HTTP
POST /api/v1/orders/payin HTTP/1.1
X-Api-Key-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
X-Signature: <generated-signature>
X-Timestamp: 1234567
Content-Type: application/json
Accept: application/json
{
"reference_id": "merchant-order-12345",
"currency": "USD",
"amount": 100.00,
"merchant_gate_method_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payment_method_data": {
"payment_url": "https://merchant.example/payment/12345"
},
"customer": {
"reference_id": "customer-12345",
"first_name": "John",
"last_name": "Doe",
"email": "user@example.com",
"phone": "+12025550123",
"address": {
"country": "FR",
"city": "New York",
"street": "Main Street 10",
"post_code": "10001"
}
},
"callback_url": "https://merchant.example/callbacks/payin",
"return_urls": {
"success": "https://merchant.example/payment/success",
"pending": "https://merchant.example/payment/pending",
"fail": "https://merchant.example/payment/fail"
}
}
200
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"group_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"seq_id": 1024,
"reference_id": "merchant-order-12345",
"status": "SUCCESS",
"resolution": "OK",
"resolution_code": "WORKFLOW_EXECUTION_SKIPPED",
"resolution_message": "Order processed successfully.",
"provider_error_message": "",
"payment_source": "CARD",
"currency": "USD",
"amount": 100.00,
"payment_method_currency": "USD",
"payment_method_amount": 100.00,
"conversion_rate": 1,
"fee_percent": 1,
"fee_fixed": 3,
"fee_min": 1,
"fee_max": 7,
"fee_total": 4,
"total": 96,
"hold_amount": 0,
"settlement_period": 0,
"rolling_percent": 0,
"rolling_amount": 0,
"merchant_gate_method_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"merchant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payment_method_data": {
"bank_id": "bank_001",
"cpf": "27019229541",
"iban": "GB82WEST12345698765432",
"ifsc": "ifsc_001",
"pix_key": "customer@example.com",
"tckn": "37621909054"
},
"card_number": "411111******1111",
"customer": {
"reference_id": "customer-12345",
"first_name": "John",
"last_name": "Doe",
"email": "user@example.com",
"phone": "+12025550123",
"address": {
"country": "FR",
"city": "Paris",
"street": "Main Street 10",
"post_code": "75001"
}
},
"pay_url": "https://payment.example/pay/3fa85f64-5717-4562-b3fc-2c963f66afa6",
"return_url": "https://merchant.example/payment/success",
"rrn": "123456789012",
"create_date": 1783705454,
"update_date": 1783705454,
"comment": "Merchant order comment."
}
Headers
API key identifier issued for the merchant integration.
Request signature generated from the HTTP method, request path without query string, raw request body, and timestamp.
Unix epoch timestamp in seconds used in the signature base string.
Request signature
This endpoint requires the X-Signature header. For signature generation rules, see Request Signature Authentication.
Request body
application/jsonRequest body for creating a payin order.
Merchant-side order identifier. Use this value to match the created order with the corresponding order in the merchant system and to prevent duplicate payment requests.
Currency in which the payin order amount is processed.
USDEURUAHKZTUSDT_TRONPayin order amount.
Identifier of the merchant gate payment method used to create and process the payin order.
payment_method_data
object
optional
Additional payment method data used for the selected merchant gate payment method.
Additional payment method data used for the selected merchant gate payment method.
URL of the merchant website or payment page associated with the payment.
customer
object
required
Customer information associated with the payin order.
Customer information associated with the payin order.
Customer identifier in the merchant system.
Customer first name. Use Latin letters and supported special characters only.
Customer last name. Use Latin letters and supported special characters only.
Customer email address in a standard email format, such as local-part@domain. The value must contain a local part, the @ symbol, and a valid domain.
Customer phone number in international format. The value must start with + and contain digits after the country calling code.
address
object
optional
Customer address information.
Customer address information.
Two-letter country code in ISO 3166-1 alpha-2 format.
Customer city name.
Customer street address.
Customer postal or ZIP code.
Merchant callback URL used to receive the final status notification for the payin order.
return_urls
object
optional
Merchant return URLs used to redirect the customer after the payment flow reaches a corresponding result.
Merchant return URLs used to redirect the customer after the payment flow reaches a corresponding result.
URL where the customer is redirected after a successful payment flow.
URL where the customer is redirected when the payment flow remains pending.
URL where the customer is redirected after a failed payment flow.
Responses
200 OK. Payin order created successfully. application/json
Returns the created payin order object.
System-generated unique payin order identifier. Use this value to retrieve a specific payin order by ID.
Identifier used to group related orders. Orders created or processed as part of the same operation can share this value.
Sequential numeric identifier of the payin order.
Order reference identifier provided by the merchant system. Use this value to match the created order with the corresponding order in the merchant system.
Current payin order processing status.
CREATEDIN_PROGRESSPROCESS_PENDINGSUCCESSFAILEDCLOSEDHigh-level processing resolution for the order.
OKSYSTEM_ERRORPROVIDER_ERRORMachine-readable resolution reason code returned for the order.
ACCESS_DENIEDAMOUNT_OVER_LIMITAMOUNT_UNDER_LIMITBALANCE_INSUFFICIENTBALANCE_UPDATE_FAILEDBLACKLISTED_INPUT_DATACURRENCY_INVALIDDESTINATION_ACCOUNT_INVALIDMERCHANT_MISCONFIGURATIONMETHOD_INACTIVEMETHOD_NOT_FOUNDORDER_CANNOT_BE_PROCESSEDORDER_CANNOT_BE_ROUTEDORDER_FAILED_MANUALLYPAYMENT_METHOD_NOT_SUPPORTEDPROVIDER_NOT_SUPPORTEDREPORT_GENERATION_FAILEDRESOURCE_NOT_FOUNDUNKNOWN_ERRORVALIDATION_FAILEDWORKFLOW_EXECUTION_SKIPPEDHuman-readable message with additional details about the order resolution.
Error message returned by the payment provider, if available.
Payment source used for the order.
CARDP2PCRYPTOPHONEPIXBLIKOriginal order currency.
USDEURUAHKZTUSDT_TRONOriginal payin order amount in the order currency.
Currency used by the selected payment method. This can differ from currency when conversion is applied.
USDEURUAHKZTUSDT_TRONOrder amount expressed in the payment method currency. This can differ from amount when conversion is applied.
Exchange rate used to convert the order amount to the payment method currency.
Percentage-based fee rate applied to the order amount.
Fixed fee amount charged for the order.
Minimum fee amount that can be applied to the order.
Maximum fee amount that can be applied to the order.
Final fee amount calculated for the order after applying percentage, fixed, minimum, and maximum fee rules.
Calculated payin total after fee calculation. Use amount for the original order amount and fee_total for the calculated fee.
Amount placed on hold during the settlement period.
Number of days funds remain on hold before becoming available.
Percentage of the order amount allocated to rolling reserve.
Amount allocated to rolling reserve for the order.
Identifier of the merchant gate payment method used to process the payin order.
Identifier of the merchant associated with the order.
payment_method_data
object
Payment-method-specific data returned for the order.
Payment-method-specific data returned for the order.
Bank identifier used by a payment method or provider.
CPF value used for payment methods that require CPF.
IBAN value used for bank transfer or account-based payment methods.
IFSC value used for payment methods that require IFSC.
PIX key used for PIX-based payment methods.
TCKN value used for payment methods that require TCKN.
Masked card number associated with the payin order, when available.
customer
object
Customer information associated with the order.
Customer information associated with the order.
Customer identifier in the merchant system.
Customer first name.
Customer last name.
Customer email address.
Customer phone number in international format.
address
object
Customer address information.
Customer address information.
Two-letter country code in ISO 3166-1 alpha-2 format.
Customer city.
Customer street address.
Customer postal code.
Payment page URL used by the customer to complete the payin order.
Merchant return URL associated with the payin order.
Retrieval Reference Number returned for the payment, when available.
Unix timestamp in seconds indicating when the order was created.
Unix timestamp in seconds indicating when the order was last updated.
Comment associated with the order.