Skip to main content

Payment Flows ๐Ÿ›Ž๏ธ๐Ÿงถ

Direct Payment API

Before you build any payment flow, there are a few concepts that apply to every operation โ€” whether you're collecting a payment, issuing a refund, or pushing funds to a card.

Every operation is a single requestโ€‹

PAYSTRAX processes each money movement as a standalone HTTPS POST. What varies between operations is the endpoint and a small set of fields.

Amounts are in minor currency unitsโ€‹

Always send amounts as integers. 1000 = 10.00 EUR. For zero-decimal currencies such as JPY, 1000 = 1000 JPY.

Which operation do I need?โ€‹

The right operation depends on whether you're starting a new payment or acting on one that already exists. If you're starting fresh, the question is whether you want to settle immediately or reserve funds first. If you're acting on an existing payment, the original intent determines what's available to you.

Do you have an existing payment_id? โ”‚ โ”œโ”€โ”€ No โ†’ What do you want to do? โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Charge a card immediately โ†’ Accept a payment (intent: transfer) โ”‚ โ”œโ”€โ”€ Reserve funds, settle later โ†’ Authorise a payment (intent: authorise) โ”‚ โ”œโ”€โ”€ Push funds to a card โ†’ Issue a payout (is_direct_credit: true) โ”‚ โ””โ”€โ”€ Pull funds from a card โ†’ Fund a card (is_account_funding: true) โ”‚ โ””โ”€โ”€ Yes โ†’ What was the original intent? | โ”‚ | โ”œโ”€โ”€ Sale | โ”‚ โ””โ”€โ”€ Refund the cardholder โ†’ Refund a payment | โ”‚ | โ””โ”€โ”€ Pre-auth | โ”‚ | โ”œโ”€โ”€ Settle the hold โ†’ Capture | โ””โ”€โ”€ Release the hold โ†’ Cancel

Key rules for card payments ๐Ÿงถโ€‹

A few base rules to know before you build โ€” they'll keep the rest of your integration smooth.

Request Structureโ€‹

FieldTypeRequiredDescription
amountintegerYESPayment amount in minor units (e.g.,cents).
currencystringYESThree-letter ISO 4217 code.
receiver.configuration_idstringYESPSP/acquirer configuration identifier.
sender.typestringYESE.g. credit_card_token, bank_account, asset, etc. Set to credit_card for card payments (same for receiver.type, when the card is the receiver).
intentstringYESauthorise, transfer โ€” transfer creates a sale, funds are debited immediately; authorise creates a pre-authorisation, funds are reserved and settled later.
routing.payment_flowstringYESFlow identifier (e.g. credit_card, a2a, wallet). Set to credit_card for all card payments.
routing.processors๐Ÿงถarray[string]NOPreferred processor list (hints).
sender.asset_id๐ŸงถstringNOAsset reference when using stored payment.
sender.custom_dataobjectNOCredentials or token payload (flow-specific; see method-guides).
recurring_setup.modelsarray[string]NOConsent models (e.g. cit, mit_scheduled).
purchase_data objectNOBilling address for AVS, customer details and custom value to diferentiate between Payout and Funding
descriptorsobjectNOstatement, reconciliation
integration๐ŸงถobjectNOreturn_url, cancel_url, failure_url
channelstringNOSale channel (e.g. ecommerce, moto). Set to ecommerce for card-not-present transactions.
custom_dataobjectNOFlow-specific extensions (3DS, network-token, metadata). CVC is submitted at root custom_data.authentication.cvc, separate from the card details in sender.custom_data.
meta_data ๐ŸงถobjectNOArbitrary merchant key/value pairs.