Skip to main content

Create a PayIN charge

PayIN allows a merchant to issue charges through Orkestral. The platform selects the Payment Service Provider (PSP) configured in the payment flow and tracks the transaction until its final state.

Before you start

You need:

  • an active Orkestral account;
  • at least one registered PSP;
  • a payment flow for each payment method;
  • an OAuth/JWT access token;
  • the merchant UUID (merchantId);
  • a public HTTPS URL if you want to receive webhooks.

Environments

EnvironmentBase URL
QAShttps://api-qas.orkestralpay.com.br

Ask the Orkestral team for the production URL and credentials. Do not reuse tokens or credentials across environments.

Authentication

Send the token in the Authorization header:

Authorization: Bearer <access_token>
Content-Type: application/json

Endpoint

POST /transaction/payin/{merchantId}
curl --request POST \
--url "https://api-qas.orkestralpay.com.br/transaction/payin/<merchantId>" \
--header "Authorization: Bearer <access_token>" \
--header "Content-Type: application/json" \
--data '{
"transaction_id": "123e4567-e89b-12d3-a456-426614174000",
"amount": 10000,
"currency": "COP",
"description": "Payment for services",
"payment_method": "TRANSFER",
"origin_url": "https://merchant.example.com/checkout",
"ok_url": "https://merchant.example.com/payment/success",
"error_url": "https://merchant.example.com/payment/error",
"webhook_url": "https://merchant.example.com/webhooks/orkestral",
"expiration": "2027-12-31T23:59:59"
}'

Replace dates, identifiers, URLs, and credentials with values from your environment. The expiration date must be in the future.

Request fields

FieldTypeRequiredDescription
transaction_idUUIDYesUnique identifier assigned by the merchant.
amountintegerYesPositive value in the currency's minor unit. Example: 100 = 1.00.
currencystringYesUppercase currency code.
descriptionstringNoCharge description.
payment_methodstringNoSelected payment method.
origin_urlstringNoCheckout origin URL.
ok_urlstringNoRedirect URL after success.
error_urlstringNoRedirect URL after an error.
webhook_urlstringNoEndpoint that receives status updates.
clientobjectConditionalPayer data required by specific PSPs.
beneficiary_senderobjectConditionalRequired by WePayments.
product_infoobjectNoProduct data.
expirationdate/timeYesFuture local ISO 8601 date and time.

Conditional fields and additional information vary by PSP and payment method.

Accepted values

FieldValues
currencyBRL, COP, CRC, ECS, GTQ, PEN, MXN, NIO, PAB, HNL, CLP, SVC, USD
payment_methodCREDIT_CARD, DEBIT_CARD, WALLETS, CASH, TRANSFER, PIX, PSE

Document types depend on the country and PSP. Examples include CPF, CNPJ, CC, CE, DNI, NIT, RFC, and RUC.

Create without a payment method

Omit payment_method when the customer will select it later:

{
"transaction_id": "123e4567-e89b-12d3-a456-426614174000",
"amount": 10000,
"currency": "COP",
"description": "Payment for services",
"webhook_url": "https://merchant.example.com/webhooks/orkestral",
"expiration": "2027-12-31T23:59:59"
}

The transaction may be created as WAITING_PAYMENT_METHOD.

Success response

A successful request returns 201 Created. Optional fields vary by PSP and payment method:

{
"id": "123e4567-e89b-12d3-a456-426614174000",
"merchant_id": "11111111-1111-1111-1111-111111111111",
"amount": 10000,
"currency": "COP",
"payment_method": "TRANSFER",
"status": "WAITING_CUSTOMER_PAYMENT",
"custom_code": "merchant-reference",
"created_date": "2026-07-30T15:00:00",
"country": "CO",
"checkout_url": "https://checkout.example.com/transaction"
}

Store id for reconciliation. A created charge is not necessarily paid; use the response status and webhooks.

Error handling

HTTPCommon causeRecommended action
400Invalid field, currency, or payment methodFix the payload before retrying.
401Missing, invalid, or expired tokenObtain a valid token.
403Credential cannot access the resourceCheck merchant permissions.
404Merchant or configuration not foundCheck merchantId and environment.
409Identifier already usedReconcile the original charge.
422Business rule or PSP configuration errorReview the PSP and payment flow.
5xxTemporary failureQuery the transaction before retrying and use backoff.

Do not retry with a different transaction_id after a timeout or 5xx until you confirm whether the first request was processed.

Webhooks

Orkestral sends updates to the transaction's webhook_url, or to the merchant's default notification URL when applicable:

PATCH <webhook_url>
Content-Type: application/json
IP: <notifier service address>
{
"status": {
"paymentStatusId": 3,
"name": "APPROVED"
},
"message": "Payment approved"
}

Return an HTTP 2xx response promptly. Failed deliveries are retried, so process notifications idempotently. The IP header is not a cryptographic signature and must not be the sole source-authentication mechanism.

PayIN statuses are WAITING_CUSTOMER_PAYMENT, EXPIRED, APPROVED, DENIED, ERROR, WAITING_PAYMENT_METHOD, CHARGEBACK, WAITING_REFUND, REFUNDED, REFUND_ERROR, DECLINED, and CAPTURED.

Security and PCI DSS

  • Never send PAN, CVV, or raw card data to this endpoint.
  • Use the Orkestral-approved tokenization/SDK flow for cards.
  • Keep tokens in backend services only.
  • Do not log credentials or sensitive data.
  • Use TLS and valid HTTPS certificates.
  • Tokenization reduces exposure but does not automatically remove the merchant's PCI DSS obligations.

See also Secret Key and Notification URL.