paymentRequests

Payment Requests Create

post/payment-requests

Request

  • Base URL: https://api.sandbox.tryspare.ae
  • URL: https://api.sandbox.tryspare.ae/payment-requests
  • Auth: HTTP bearer

Headers

x-signaturestring required

ES256 request signature. Required on signed-write endpoints, see request signing.

x-customer-idstring

Optional merchant-supplied customer UUID for debtor account tagging. Must be a valid UUID.

x-tenantstring required
Example:UAE

Regulatory jurisdiction the request routes to (e.g. UAE, KSA, MAIN). Match it to the market you're integrating.

Request body

channel'sdk_web' | 'sdk_flutter' | 'sdk_react_native' | 'hosted_web'
consentPermissionsstring[]

Data permissions the consent grants (e.g. read balances, read transactions).

creditorReferencestring

Your reference for the creditor/payee, echoed back for reconciliation.

creditorTypestring required

Type of creditor (e.g. MERCHANT).

debtorReferencestring

Your reference for the debtor/payer.

failureRedirectUrlstring

URL to redirect the payer to after a failed or cancelled authorization.

merchantReferencestring required

Your merchant reference for this transaction, echoed back for reconciliation.

providerIdstring uuid

Format: UUID.

purposestring required

Payment purpose code, see the payment purpose codes reference.

savedDebtorAccountIdstring

Mutually exclusive with `debtorAccount`. Requires `x-customer-id` header.

successRedirectUrlstring

URL to redirect the payer to after a successful authorization.

typestring required

The payment request type, for example SingleInstantPayment. Determines which other fields are required.

Example request

{
  "instructions": {
    "amount": {
      "currency": "AED"
    },
    "currencyRequest": {
      "exchangeRateInformation": {
        "unitCurrency": "AED"
      }
    },
    "maxCumulativeAmount": {
      "currency": "AED"
    },
    "paymentSchedule": [
      {
        "amount": {
          "currency": "AED"
        },
        "maxAmount": {
          "currency": "AED"
        },
        "paymentExecutionDate": "2025-01-01T00:00:00Z"
      }
    ],
    "periodicSchedule": {
      "amount": {
        "currency": "AED"
      },
      "controls": {
        "maxCumulativeAmountPerPeriod": {
          "currency": "AED"
        }
      },
      "endDate": "2025-01-01T00:00:00Z",
      "maxAmount": {
        "currency": "AED"
      },
      "startDate": "2025-01-01T00:00:00Z"
    }
  },
  "providerId": "00000000-0000-0000-0000-000000000000",
  "risks": {
    "debtorIndicators": {
      "deviceInformation": {
        "deviceLocalDateTime": "2025-01-01T00:00:00Z",
        "lastBindingDateTime": "2025-01-01T00:00:00Z"
      }
    },
    "DeliveryAddress": {
      "Country": "AE"
    }
  }
}

Response

Success response

errorstring nullable
errorDescriptionobject nullable

Example response

{
  "data": {
    "createdAt": "2025-01-01T00:00:00Z",
    "currency": "AED",
    "instructions": {
      "amount": {
        "currency": "AED"
      },
      "currencyRequest": {
        "exchangeRateInformation": {
          "unitCurrency": "AED"
        }
      },
      "maxCumulativeAmount": {
        "currency": "AED"
      },
      "paymentSchedule": [
        {
          "amount": {
            "currency": "AED"
          },
          "maxAmount": {
            "currency": "AED"
          },
          "paymentExecutionDate": "2025-01-01T00:00:00Z"
        }
      ],
      "periodicSchedule": {
        "amount": {
          "currency": "AED"
        },
        "controls": {
          "maxCumulativeAmountPerPeriod": {
            "currency": "AED"
          }
        },
        "endDate": "2025-01-01T00:00:00Z",
        "maxAmount": {
          "currency": "AED"
        },
        "startDate": "2025-01-01T00:00:00Z"
      }
    },
    "risks": {
      "debtorIndicators": {
        "deviceInformation": {
          "deviceLocalDateTime": "2025-01-01T00:00:00Z",
          "lastBindingDateTime": "2025-01-01T00:00:00Z"
        }
      },
      "DeliveryAddress": {
        "Country": "AE"
      }
    },
    "updatedAt": "2025-01-01T00:00:00Z"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.