SpareSpare Docs
GuidesAPI Reference

Payment Request Deep Dives

Field-level controls for each payment type on POST /payment-requests.

Spare exposes one create endpoint for every payment type. You set type on POST /payment-requests. Type-specific fields live in instructions.

Why One Endpoint

Spare handles every payment type behind one create endpoint so you can support the Open Finance payment types your product needs without integrating each type separately. You integrate and test against POST /payment-requests, then choose the type with type and the matching instructions fields.

Rules and updates for individual payment types land on that same endpoint. You do not maintain a different create path per type when a type's fields or validation change.

When Spare ships new payer journeys that use these payment types, you can adopt them with minimal changes on your side: same endpoint, updated type and instructions where your use case requires it.

Create requests require request signing. See Request Signing.

Choose a Payment Type

Payment types group by how amounts and schedules work:

GroupWhat it isTypes
On-DemandYou initiate payments at any time, with no fixed payment dates. Limits reset on a rolling period you define.FixedOnDemand, VariableOnDemand
Periodic (recurring)Payments run on a regular schedule: daily, weekly, monthly, or yearly.FixedPeriodicSchedule, VariablePeriodicSchedule
DefinedPayments are pre-scheduled for specific calendar dates.FixedDefinedSchedule, VariableDefinedSchedule
Single instantOne fixed amount, one immediate debit.SingleInstantPayment
TypeAmount modelSchedule modelGuide
SingleInstantPaymentFixed amountImmediateSingle Instant Payment
FixedPeriodicScheduleFixed amountRegular recurring scheduleFixed Periodic Schedule
VariablePeriodicScheduleUp to a max amountRegular recurring scheduleVariable Periodic Schedule
FixedOnDemandFixed amountYou trigger each debitFixed On Demand
VariableOnDemandUp to a max amountYou trigger each debitVariable On Demand
FixedDefinedScheduleFixed amount per dateExplicit date listFixed Defined Schedule
VariableDefinedScheduleMax amount per dateExplicit date listVariable Defined Schedule

Shared Request Fields

These root fields apply on create. Most apply to every payment type. Fields marked Conditional* apply only under the condition in Description. Fields marked Optional* are work in progress. Type pages document instructions in detail.

Root body

FieldPresenceDescription
typeRequiredPayment type enum. Selects the instructions validation rules.
creditorTypeRequiredCreditor kind: MERCHANT, USER, or CREDITOR.
creditorAccountRequiredPayee account that receives funds. Nested fields below.
additionalCreditorAccountsConditional*Extra creditor accounts beyond creditorAccount. Valid only when type is VariableOnDemand. Primary plus additional accounts must total at most 10, and each account must be unique by scheme and identification. See Variable On Demand.
purposeRequiredPayment purpose code. See Payment purpose codes.
merchantReferenceRequiredYour idempotent merchant reference for this request.
instructionsRequiredType-specific fields. Shape depends on type. See Instructions Building Blocks.
creditorReferenceOptionalYour reference for the creditor. Max 22 characters. No hyphens.
debtorReferenceOptionalYour reference for the payer.
debtorAccountOptionalPayer account when you already know it. When omitted, the bank prompts the payer to choose. Mutually exclusive with savedDebtorAccountId. Nested fields below.
savedDebtorAccountIdOptionalPreviously saved debtor account id. Requires x-customer-id. Mutually exclusive with debtorAccount.
successRedirectUrlOptionalBrowser return URL after successful authorization.
failureRedirectUrlOptionalBrowser return URL after failed or cancelled authorization.
channelOptionalWhere the hosted flow opens (browser vs app deep-link). Controls how Spare returns the payer after bank authorization.
consentPermissionsOptionalExtra consent permission strings when your product needs them.
risks*Optional*Work in progress. Optional risk indicators for the payment context. The final object and field structure will change; do not hard-depend on the current shape.

creditorAccount

FieldPresenceDescription
schemeNameRequiredAccount scheme. Spare accepts IBAN for UAE create.
identificationRequiredAccount identifier for the scheme (IBAN value).
nameOptionalCreditor account holder name.

debtorAccount

FieldPresenceDescription
schemeNameRequiredAccount scheme (IBAN).
identificationRequiredPayer IBAN.
nameRequiredPayer name. Required when debtorAccount is supplied.

Instructions Building Blocks

These objects appear across types. Each type page states which blocks apply and which fields are required.

BlockWhat it is
amount / maxAmountNested amount object: { "amount": "250.00", "currency": "AED" }. amount is a decimal string with two fraction digits. currency is ISO-4217 uppercase. Fixed types use amount. Variable types use maxAmount as the ceiling per debit or entry.
maxCumulativeAmountOptional lifetime ceiling: the maximum cumulative value of payments that may be initiated over the lifetime of the consent. When you set it, its value must be greater than the individual debit amount (amount or maxAmount), except where a type page requires an exact total (periodic amount Γ— payment count, or the sum of a defined schedule).
maxCumulativeNumberOfPaymentsOptional lifetime ceiling: the maximum cumulative number of payments that may be initiated over the lifetime of the consent. Must be greater than zero when set. Type pages state how you must calculate it.
periodicScheduleSchedule object for periodic and on-demand types: frequency, startDate, endDate, and amount fields. On on-demand types it also carries controls.
controlsOn-demand types only (FixedOnDemand, VariableOnDemand). Nested under periodicSchedule. Defines rolling per-period limits that reset each frequency window (Day, Week, Month, or Year). See the on-demand pages.
paymentScheduleArray of dated entries for defined-schedule types. Each entry has paymentExecutionDate plus amount or maxAmount.
isInternationalPayment / currencyRequestCross-border flags and FX/transfer metadata. Supported on Single Instant and defined-schedule types under the rules on those pages. Rejected on periodic and on-demand types.
permissionsOptional consent-scope booleans (readAccountsBasic, readAccountsDetail, readBalances, readRefundAccount, confirmPayee). When confirmPayee is omitted, Spare defaults it to true.
copCreditorNameOptional creditor name parts used when Confirmation of Payee needs structured names.

Lifetime vs rolling limits

  • Lifetime fields (maxCumulativeAmount, maxCumulativeNumberOfPayments) bound the whole consent.
  • Rolling fields live in periodicSchedule.controls and apply only to on-demand types. They bound activity inside one frequency period, then reset for the next period.

Example: on VariableOnDemand, frequency is Week and controls.maxCumulativeAmountPerPeriod is AED 100. You may initiate up to AED 100 of debits in that week. Further debits in the same week are rejected. The AED 100 limit resets at the start of the next week.

Where Next

On this page