Skip to main content

Payments

The Payments API lets you initiate fund transfers to a beneficiary and manage them through their whole lifecycle—from creation to settlement.

Before you start

Every payment needs a beneficiary (the account being paid). Either create one first (see Beneficiary Management) and pass its beneficiaryId, or create the beneficiary and payment together in a single call (see Pay a new beneficiary in one call).

clientId is required

As a Program Manager you are the Tenant administrator — clientId identifies which Client within your Tenant this payment is for. See Understanding Your Role.

Two payment scenarios

ScenarioWhenExtra requirement
StandardThe payment currency matches the currency heldNone
FXThe payment currency differs from the currency heldA quotationId to lock the rate

For FX payments, request a firm rate first with POST /payments/quotation and pass the returned quotationId. See FX Rates.

How it works

Create a payment

curl -X POST "https://api.sandbox.capay.com.au/payments" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-H "x-idempotency-key: unique-key-12345" \
-d '{
"clientId": "401f4647-8372-495f-8de0-aafb3e1eaf93",
"beneficiaryId": "501f4647-8372-495f-8de0-aafb3e1eaf93",
"currencyCode": "USD",
"amount": 10000.55,
"chargeType": "SHARED",
"purposeCode": "GOODS",
"paymentReference": "Invoice-123",
"paymentDate": "2024-07-30"
}'

Request fields

FieldRequiredDescription
clientIdYesThe client the payment is made for
beneficiaryIdYesThe beneficiary to pay
currencyCodeYesPayment currency (ISO 4217)
amountYesAmount in payment currency, max 2 decimals
chargeTypeYesSHARED or OURS (SWIFT only—see below)
purposeCodeYesReason for the payment (see table)
paymentReferenceYesReference shown to the beneficiary, max 64 chars
paymentDateYesYYYY-MM-DD
sellCurrencyCodeFXCurrency held, if converting
quotationIdFXLocked rate from POST /payments/quotation
sourceOfFundsConditionalRequired for local payments, or POBO SWIFT payments to personal beneficiaries
invoiceNumber / invoiceDateConditionalRequired for local INR payments to business beneficiaries
referenceIdOptionalYour unique reference for idempotency (see below)

Payment capabilities

Capay supports paying 30+ currencies, and follows international standard (ISO 4217 ) for representation of currencies.

Currency CodeCurrency NameCountryGlobal PaymentLocal Payment
AEDUnited Arab Emirates DirhamUnited Arab Emirates
AUDAustralian DollarAustralia
BHDBahraini DinarBahrain
BRLBrazilian RealBrazil
CADCanadian DollarCanada
CHFSwiss FrancSwitzerland
CNHChinese Yuan (Offshore)China
CNYChinese YuanChina
CZKCzech KorunaCzech Republic
DKKDanish KroneDenmark
EUREuroSEPA Countries
GBPPound SterlingUnited Kingdom
HKDHong Kong DollarHong Kong
HUFHungarian ForintHungary
IDRIndonesian RupiahIndonesia
ILSIsraeli ShekelIsrael
INRIndian RupeeIndia
JPYJapanese YenJapan
KESKenyan ShillingKenya
KRWSouth Korean WonSouth Korea
KWDKuwaiti DinarKuwait
MXNMexican PesoMexico
MYRMalaysian RinggitMalaysia
NOKNorwegian KroneNorway
NZDNew Zealand DollarNew Zealand
OMROmani RialOman
PHPPhilippine PesoPhilippines
PLNPolish ZłotyPoland
QARQatari RialQatar
RONRomanian LeuRomania
SARSaudi RiyalSaudi Arabia
SEKSwedish KronaSweden
SGDSingapore DollarSingapore
THBThai BahtThailand
TRYTurkish LiraTurkey
UGXUgandan ShillingUganda
USDUS DollarUnited States
VNDVietnamese DongVietnam
ZARSouth African RandSouth Africa

The table above lists the currencies technically supported by our API. The final capability of money collection available is subject to the valid commercial agreement.

Fees and payment methods

Two distinct concepts are easy to confuse:

  • chargeType is a field you set, and applies only to SWIFT payments. It decides who bears the SWIFT/intermediary fees:

    chargeTypeMeaning
    SHAREDFees are shared—deducted from both the payment amount and the payment fee
    OURSThe sender bears all fees—deducted from the payment fee only
  • Payment method (the rail used) is determined automatically from the beneficiary and currency, not set by you:

    MethodNotes
    SWIFTGlobal payments; chargeType applies
    LocalLocal rails; fees deducted from the payment fee
    InnerThe beneficiary is also a CAPAY client (identified by uniquePayId / CAPAY FastID)—no fee is charged

Purpose codes

purposeCode describes the nature of the payment. Choose the code that matches both the transaction type and the payment's purpose.

CodeDescriptionB2BB2CC2BC2CCommon scenarios
GOODSPayment for goodsPurchasing inventory, buying equipment, product orders
SERVICESPayment for servicesConsulting fees, professional services, service contracts
SAVINGTransfer of savings (own account)Moving funds to savings, internal account transfers
FAMILYTransfer to friends / familySending money to family, gifts to friends, personal support
INTER_GROUP_TRANSFERInter-company transfer / repatriation of fundsInter-company transfers, group fund movements, repatriation of profits
HIGH_VALUE_ITEMHigh-value items (property, jewellery, vehicles)Property purchases, jewelry transactions, vehicle purchases, luxury goods
INVESTMENTInvestmentInvestment deposits, portfolio funding, capital investments
DEBTDebt / debt repaymentLoan repayments, debt settlements, credit payments
COMPANY_MANAGECompany management expenses (salary, rent, utilities)Salary payments, rent payments, utility bills, office expenses
FREIGHTLogistics / freightShipping fees, freight charges, logistics services, transportation costs
Transaction types

B2B Business to Business · B2C Business to Consumer · C2B Consumer to Business · C2C Consumer to Consumer

Applicability is product guidance for choosing the right code; it is not enforced by the schema.

Pay a new beneficiary in one call

POST /payments/with-beneficiary creates the payment and the beneficiary together. If a matching beneficiary already exists it is reused; otherwise a new one is created. Duplicate detection uses clientId + routing number + account number + account name + currency code.

Idempotency

Payment creation is a mutating operation—protect against duplicates:

  • Send an x-idempotency-key header (≤ 36 chars) on the request. A repeated key returns 409 Duplicate idempotency key detected.
  • Optionally set referenceId in the body for business-level deduplication; creation fails if a payment with the same referenceId already exists.

Payment status lifecycle

A payment moves through several states. All status changes trigger a webhook notification at least once.

StatusCancelableDescription
PENDING APPROVALAwaiting internal approval within the client's organisation (see below)
SCHEDULEDApproved and queued for execution on the payment date
WAITING FUNDSNeeds funding before it can be sent
SENDINGActively being transmitted through the payment network
COMPLETED[Final] Funds delivered to the beneficiary
CANCELLED[Final] Cancelled before sending (auto-refunded if funds were deducted)
FAILED[Final] Could not be completed (auto-refunded)
REJECTED[Final] Did not pass internal approval
Internal approval

PENDING APPROVAL is a client-side internal approval — it is not a CA review. It reflects the client's own authorisation workflow, for example a company user creates the payment and a company admin approves it before it proceeds.

CA supports two approval models, configured in the Client Portal under Risk Control → Limits Settings:

  • Single-layer approval — one approver is required to authorise the payment.
  • Dual-layer approval — two approvers must authorise the payment in sequence.

The applicable model and the payment amount thresholds that trigger approval are defined in Limits Settings. A payment enters PENDING APPROVAL when its amount exceeds the creator's approval limit under whichever model applies. If REJECTED by an approver, the payment moves to a final REJECTED state and is not processed.

Update or cancel a payment

  • Update (PUT /payments/{id}) — amend paymentReference, paymentDate, purposeCode, sourceOfFunds, or invoice fields while the payment is still in progress.
  • Cancel (PUT /payments/cancel/{id}) — only possible in SCHEDULED or WAITING FUNDS. Once SENDING, a payment cannot be cancelled. Cancelled payments are auto-refunded if funds were already deducted.

Retrieve payments

  • GET /payments — list with filters (clientId, referenceNo, currencyCode, beneficiaryId, status, date/time ranges, pagination).
  • GET /payments/{id} — fetch a single payment by ID or referenceId.