SpareSpare Docs
GuidesAPI Reference

Payments

List and retrieve settled payments.

GET
/payments
Authorization
Header

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

Query

1-based page number for paginated results. Defaults to the first page.

Number of items to return per page. Defaults to the API's page size.

Filter results by your own reference set when the resource was created.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/payments" \  -H "x-tenant: KSA"
{  "data": [    {      "amount": "string",      "clientId": "string",      "consentPermissions": [        "string"      ],      "createdAt": "2019-08-24T14:15:22Z",      "creditorAccountId": "string",      "creditorIdentification": "string",      "creditorName": "string",      "creditorReference": "string",      "creditorScheme": "string",      "creditorType": "string",      "currencyCode": "string",      "debtorReference": "string",      "externalReferenceId": "string",      "failureRedirectUrl": "string",      "id": "string",      "instructions": {        "amount": {          "amount": "string",          "currency": "string"        },        "currencyRequest": {          "chargeBearer": "BorneByCreditor",          "currencyOfTransfer": "string",          "destinationCountryCode": "string",          "exchangeRateInformation": {            "contractIdentification": "string",            "exchangeRate": 0,            "rateType": "Actual",            "unitCurrency": "string"          },          "fxQuoteId": "string",          "priority": "Normal",          "purpose": "string"        },        "isInternationalPayment": true,        "maxCumulativeAmount": {          "amount": "string",          "currency": "string"        },        "maxCumulativeNumberOfPayments": 0,        "paymentSchedule": [          {            "amount": {              "amount": "string",              "currency": "string"            },            "maxAmount": {              "amount": "string",              "currency": "string"            },            "paymentExecutionDate": "string"          }        ],        "periodicSchedule": {          "amount": {            "amount": "string",            "currency": "string"          },          "controls": {            "maxCumulativeAmountPerPeriod": {              "amount": "string",              "currency": "string"            },            "maxCumulativeNumberOfPaymentsPerPeriod": 0          },          "endDate": "string",          "frequency": "Day",          "maxAmount": {            "amount": "string",            "currency": "string"          },          "startDate": "string"        },        "permissions": {          "confirmPayee": true,          "readAccountsBasic": true,          "readAccountsDetail": true,          "readBalances": true,          "readRefundAccount": true        }      },      "internalReferenceId": "string",      "isCopPerformed": true,      "paymentExecutionDate": "2019-08-24T14:15:22Z",      "paymentType": "string",      "purpose": "string",      "risks": {        "BeneficiaryAccountType": "string",        "DeliveryAddress": {          "AddressLine": [            "string"          ],          "BuildingNumber": "string",          "Country": "string",          "CountrySubDivision": [            "string"          ],          "PostCode": "string",          "StreetName": "string",          "TownName": "string"        },        "MerchantCategoryCode": "string",        "MerchantCustomerIdentification": "string",        "PaymentContextCode": "string"      },      "status": "string",      "successRedirectUrl": "string",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "error": "string",  "errorDescription": {    "property1": [      "string"    ],    "property2": [      "string"    ]  },  "meta": {    "currentPageNumber": 0,    "pageSize": 0,    "totalNumberOfPages": 0  }}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "not_found",  "details": {},  "message": "string"}
GET
/payments/{paymentId}
Authorization
Path

UUID of the payment.

Header

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

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/payments/string" \  -H "x-tenant: KSA"
{  "data": {    "error": {      "Code": "string",      "Errors": [        {          "ErrorCode": "string",          "Message": "string",          "Path": "string",          "Url": "string"        }      ],      "Id": "string",      "Message": "string"    },    "message": {      "Data": {        "Charges": [          {            "Amount": {              "Amount": "string",              "Currency": "string"            },            "ChargeBearer": "string",            "Type": "string"          }        ],        "ConsentId": "string",        "CreationDateTime": "string",        "DebtorReference": "string",        "DomesticPaymentId": "string",        "ExchangeRate": {          "ContractIdentification": "string",          "ExchangeRate": 0,          "ExpirationDateTime": "string",          "RateType": "string",          "UnitCurrency": "string"        },        "Links": {          "Related": "string",          "Self": "string"        },        "OpenFinanceBilling": {          "MerchantId": "string",          "Type": "string"        },        "PaymentId": "string",        "PaymentPurposeCode": "string",        "PaymentTransactionId": "string",        "RejectReasonCode": [          {            "Code": "string",            "Description": "string"          }        ],        "Status": "string",        "StatusUpdateDateTime": "string"      },      "Links": {        "Related": "string",        "Self": "string"      },      "Meta": {        "TotalPages": 0      }    },    "requestData": {      "error": "string",      "httpMethod": "string",      "idempotencyKey": "string",      "interactionId": "string",      "requestSeconds": 0,      "statusCode": 0,      "url": "string"    },    "signedMessage": "string"  },  "error": "string",  "errorDescription": {    "property1": [      "string"    ],    "property2": [      "string"    ]  }}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "string",  "details": {},  "message": "string"}
{  "code": "not_found",  "details": {},  "message": "string"}