Skip to content

April API (3.0)

Download OpenAPI description
Languages
Servers
Sandbox
https://api.sandbox.au.meetapril.io
Production
https://api.au.meetapril.io

Authentication

These endpoints provide various methods for authenticating users from a backend service.

  • POST /auth/signin Sign-in from a backend service on behalf of a consumer customer (B2C) or customer delegate (B2B)
Operations

Customers

A person or business purchasing goods or services from a merchant using Spenda to facilitate the payment. Customers are defined at the merchant level, so if an individual makes payments with multiple merchants, they will have a customer record for each of these merchants.

Spenda supports two broad categories of customers:

Consumer customers are individuals typically making purchases from the merchant via e-commerce websites. They are uniquely identified by emailAddress for a given merchant.

Organisation customers represent businesses wishing to make purchases from the merchant. They are uniquely identified by referenceCustomerId for a given merchant.

Operations

Merchants

A business or individual that uses Spenda to facilitate payments for their customers.

Operations

Payment sources

A payment source represents a reusable source of funds to use for payments.

Operations

Get Payment Source

Request

Security
Marketplace API Key | Admin JWT | Customer JWT
Path
sourceIdstringrequired
curl -i -X GET \
  'https://api.sandbox.au.meetapril.io/sources/{sourceId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Bodyapplication/json
paymentSourceIdstringrequired
customerIdstring
merchantIdstring
customerDelegateIdstring
sourceMethodCardMethodResp (object) or DirectDebitMethodResp (object) or PayToMethodResp (object)(SavedPaymentSourceMethodResp)required
One of:
sourceMethod.​CardMethodRespobject(CardMethodResp1)required
sourceMethod.​CardMethodResp.​countrystring(IsoCountry)required
Enum"AF""AX""AL""DZ""AS""AD""AO""AI""AQ""AG"
sourceMethod.​CardMethodResp.​last4stringrequired
sourceMethod.​CardMethodResp.​brandstring(CardBranding)required
Enum"MasterCard""Visa""American Express""Unknown"
sourceMethod.​CardMethodResp.​fundingstring(CardFunding1)required
Enum"Credit""Debit""Prepaid""Unknown"
sourceMethod.​CardMethodResp.​cardBinstringrequired
sourceMethod.​CardMethodResp.​expMonthinteger(int32)required
sourceMethod.​CardMethodResp.​expYearinteger(int32)required
usageScopestring(PaymentSourceUsageScope)

Used to determine the context of a payment sources. Should be null for consumer customers.

  • ScopeOrganisation - For B2B customers, a payment source saved with organisation scope is available to all delegates of the organisation represented by the customer.
  • ScopeDelegate - For B2B customers, a payment source saved with delegate scope is only available to the delegate who added the payment source.
  • ScopeBilling - Indicates a payment source that can be used to automatically pay fee invoices for merchants set up for gross settlement. Adding a new billing payment source will automatically configure that as the default payment source for fee invoices going forward.
Enum"ScopeOrganisation""ScopeDelegate""ScopeBilling"
createdAtstring(date-time)required

When the payment source was created.

updatedAtstring(date-time)required

When the payment source was last updated.

Response
application/json
{ "paymentSourceId": "psrc_aZ-9UfKvllCPqGsf", "customerId": "cust_aZ-9UfKvllCPqGsa", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "customerDelegateId": "custd_aZ-9VPKvllCPqGs2", "sourceMethod": { "CardMethodResp": {} }, "usageScope": "ScopeOrganisation", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }

Delete Payment Source

Request

Security
Marketplace API Key | Merchant Secret Token
Path
sourceIdstringrequired
curl -i -X DELETE \
  'https://api.sandbox.au.meetapril.io/sources/{sourceId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Response
No content

Query Payment Sources

Request

Return a paginated list of matching payment sources.

Security
Marketplace API Key | Merchant Secret Token | Admin JWT | Customer JWT
Query
limitinteger(int32)

Maximum results per page. Default to 20, must be between 1 and 500.

pageinteger(int32)

Page number of results to show (starting at page 1).

sortstring

Comma-delimited list of fields to sort by with sort priority from first to last. Fields are sorted by their natural ordering unless prefixed with a - character.

customerIdstring

Filter by merchant customer system identifier.

customerDelegateIdstring

Filter by customer delegate system identifier.

usageScopestring(PaymentSourceUsageScope)

Filter by usage scope

Enum"ScopeOrganisation""ScopeDelegate""ScopeBilling"
curl -i -X GET \
  'https://api.sandbox.au.meetapril.io/sources?limit=0&page=0&sort=string&customerId=string&customerDelegateId=string&usageScope=ScopeOrganisation' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Matching items sorted as specified

Headers
Page-Countinteger(int64)required

Total count of pages available for current query.

Total-Record-Countinteger(int64)required

Total number of records matching the query.

Bodyapplication/jsonArray [
paymentSourceIdstringrequired
customerIdstring
merchantIdstring
customerDelegateIdstring
sourceMethodCardMethodResp (object) or DirectDebitMethodResp (object) or PayToMethodResp (object)(SavedPaymentSourceMethodResp)required
One of:
sourceMethod.​CardMethodRespobject(CardMethodResp1)required
sourceMethod.​CardMethodResp.​countrystring(IsoCountry)required
Enum"AF""AX""AL""DZ""AS""AD""AO""AI""AQ""AG"
sourceMethod.​CardMethodResp.​last4stringrequired
sourceMethod.​CardMethodResp.​brandstring(CardBranding)required
Enum"MasterCard""Visa""American Express""Unknown"
sourceMethod.​CardMethodResp.​fundingstring(CardFunding1)required
Enum"Credit""Debit""Prepaid""Unknown"
sourceMethod.​CardMethodResp.​cardBinstringrequired
sourceMethod.​CardMethodResp.​expMonthinteger(int32)required
sourceMethod.​CardMethodResp.​expYearinteger(int32)required
usageScopestring(PaymentSourceUsageScope)

Used to determine the context of a payment sources. Should be null for consumer customers.

  • ScopeOrganisation - For B2B customers, a payment source saved with organisation scope is available to all delegates of the organisation represented by the customer.
  • ScopeDelegate - For B2B customers, a payment source saved with delegate scope is only available to the delegate who added the payment source.
  • ScopeBilling - Indicates a payment source that can be used to automatically pay fee invoices for merchants set up for gross settlement. Adding a new billing payment source will automatically configure that as the default payment source for fee invoices going forward.
Enum"ScopeOrganisation""ScopeDelegate""ScopeBilling"
createdAtstring(date-time)required

When the payment source was created.

updatedAtstring(date-time)required

When the payment source was last updated.

]
Response
application/json
[ { "paymentSourceId": "psrc_aZ-9UfKvllCPqGsf", "customerId": "cust_aZ-9UfKvllCPqGsa", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "customerDelegateId": "custd_aZ-9VPKvllCPqGs2", "sourceMethod": {}, "usageScope": "ScopeOrganisation", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ]

Create Payment Source

Request

Register a payment source that may be used to pay for one or more payments. For integrators who wish to call this endpoint directly, you must be PCI certified since you will be handling raw card details.

Security
Marketplace API Key | Merchant Public Token | Merchant Secret Token | Customer JWT
Headers
Customer-Idstring

Perform operation in the context of the given merchant customer. Usually not required — specify only if acting on behalf of a merchant customer not implied by the credentials specified in the Authorization header.

Merchant-Idstring

Perform operation in the context of the given merchant. Usually not required — specify only if acting on behalf of a merchant not implied by the credentials specified in the Authorization header.

Customer-Delegate-User-Idstring

Perform operation in the context of the given organisation customer. Usually not required — specify only if acting on behalf of a organisation customer not implied by the credentials specified in the Authorization header.

Bodyapplication/jsonrequired
One of:
CreateConsumerCardSourceobject(CreateConsumerCardSource1)required

DEPRECATED: Use generalised case (CreateSavedPaymentSource) instead

CreateConsumerCardSource.​numberstringrequired
CreateConsumerCardSource.​cvcstringrequired
CreateConsumerCardSource.​expiryDateobject(ExpiryDate)required

Card expiry month and year

CreateConsumerCardSource.​expiryDate.​expiryMonthstringrequired
CreateConsumerCardSource.​expiryDate.​expiryYearstringrequired
curl -i -X POST \
  https://api.sandbox.au.meetapril.io/sources \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Customer-Delegate-User-Id: string' \
  -H 'Customer-Id: string' \
  -H 'Merchant-Id: string' \
  -d '{
    "CreateConsumerCardSource": {
      "number": "string",
      "cvc": "string",
      "expiryDate": {
        "expiryMonth": "string",
        "expiryYear": "string"
      }
    }
  }'

Responses

Bodyapplication/json
paymentSourceIdstringrequired
customerIdstring
merchantIdstring
customerDelegateIdstring
sourceMethodCardMethodResp (object) or DirectDebitMethodResp (object) or PayToMethodResp (object)(SavedPaymentSourceMethodResp)required
One of:
sourceMethod.​CardMethodRespobject(CardMethodResp1)required
sourceMethod.​CardMethodResp.​countrystring(IsoCountry)required
Enum"AF""AX""AL""DZ""AS""AD""AO""AI""AQ""AG"
sourceMethod.​CardMethodResp.​last4stringrequired
sourceMethod.​CardMethodResp.​brandstring(CardBranding)required
Enum"MasterCard""Visa""American Express""Unknown"
sourceMethod.​CardMethodResp.​fundingstring(CardFunding1)required
Enum"Credit""Debit""Prepaid""Unknown"
sourceMethod.​CardMethodResp.​cardBinstringrequired
sourceMethod.​CardMethodResp.​expMonthinteger(int32)required
sourceMethod.​CardMethodResp.​expYearinteger(int32)required
usageScopestring(PaymentSourceUsageScope)

Used to determine the context of a payment sources. Should be null for consumer customers.

  • ScopeOrganisation - For B2B customers, a payment source saved with organisation scope is available to all delegates of the organisation represented by the customer.
  • ScopeDelegate - For B2B customers, a payment source saved with delegate scope is only available to the delegate who added the payment source.
  • ScopeBilling - Indicates a payment source that can be used to automatically pay fee invoices for merchants set up for gross settlement. Adding a new billing payment source will automatically configure that as the default payment source for fee invoices going forward.
Enum"ScopeOrganisation""ScopeDelegate""ScopeBilling"
createdAtstring(date-time)required

When the payment source was created.

updatedAtstring(date-time)required

When the payment source was last updated.

Response
application/json
{ "paymentSourceId": "psrc_aZ-9UfKvllCPqGsf", "customerId": "cust_aZ-9UfKvllCPqGsa", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "customerDelegateId": "custd_aZ-9VPKvllCPqGs2", "sourceMethod": { "CardMethodResp": {} }, "usageScope": "ScopeOrganisation", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }

Query Blocked Card Events

Request

Return a paginated list of events related to cards that have been blocked.

Security
Marketplace API Key | Merchant Secret Token | Admin JWT | Merchant JWT | Marketplace JWT
Query
limitinteger(int32)

Maximum results per page. Default to 20, must be between 1 and 500.

pageinteger(int32)

Page number of results to show (starting at page 1).

sortstring

Comma-delimited list of fields to sort by with sort priority from first to last. Fields are sorted by their natural ordering unless prefixed with a - character.

customerIdArray of strings

Filter by merchant customer system identifier.

merchantIdArray of strings

Filter by merchant system identifier.

marketplaceIdstring

Filter by merchant system identifier.

transactionIdArray of strings

Filter by transaction system identifier.

cardBlockIdArray of strings

Filter by card block system identifier.

cardBrandArray of strings(CardBrand)

Filter by card brand.

Items Enum"""American Express""MasterCard""Visa""Diners Club""Discover""UnionPay""Maestro""Elo""Mir"
last4string

Filter by card last four digits.

createdFromInclusivestring(date-time)

Return records that were created at or after this timestamp in ISO-8601 format

Example: createdFromInclusive=2026-02-26T03:26:15.099413498Z
createdToExclusivestring(date-time)

Return records that were created before this timestamp in ISO-8601 format

eventTypeArray of strings(BlockedCardEventType)

Filter by block card event type

Items Enum"CardBlockAdded""CardBlockEnforced""CardBlockRemoved"
curl -i -X GET \
  'https://api.sandbox.au.meetapril.io/sources/blockedcards?limit=0&page=0&sort=string&customerId=string&merchantId=string&marketplaceId=string&transactionId=string&cardBlockId=string&last4=string&createdFromInclusive=2026-02-26T03%3A26%3A15.099413498Z&createdToExclusive=2019-08-24T14%3A15%3A22Z&eventType=CardBlockAdded' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Matching items sorted as specified

Headers
Page-Countinteger(int64)required

Total count of pages available for current query.

Total-Record-Countinteger(int64)required

Total number of records matching the query.

Bodyapplication/jsonArray [
cardBlockIdstringrequired
customerDetailsobject(CustomerDetails)
purchaseDetailsobject(PurchaseDetails)
paymentMethodCardPaymentMethod (object) or DirectDebitPaymentMethod (object) or PayToPaymentMethod (object)(TransactionPaymentMethod)required
One of:
paymentMethod.​paymentMethodTypestring(PaymentMethodType1)required
Enum"Card""DirectDebit""PayTo"
paymentMethod.​cardBrandstring
paymentMethod.​cardBinstring
paymentMethod.​cardLast4string
paymentMethod.​cardFundingstring
paymentMethod.​cardIssuerstring
paymentMethod.​cardExpiryDatestring
paymentMethod.​cardCountrystring
paymentMethod.​cardCVCVerificationPassedboolean
paymentMethod.​card3DSVerificationPassedboolean
paymentMethod.​info3DSVerificationstring
paymentMethod.​walletTypestring
paymentMethod.​outcome3dsAuthenticationUnavailable (object) or FailedChallenge (object) or FailedFrictionless (object) or FailedTokenized (object) or FlowNotAttempted (object) or IncompleteChallenge (object) or LogicError (object) or NotSupported (object) or PassedChallenge (object) or PassedFrictionless (object) or PassedTokenized (object) or ResultNotAvailableError (object)(Outcome3ds)
One of:
paymentMethod.​card3DSFlowstring
paymentMethod.​cardStatementstring
paymentMethod.​cardHolderNamestring
paymentMethod.​errorCodestring(ErrorCode)
Enum"unexpected""unspecified""account_disabled""account_not_found""audience_mismatch""bad_signature""checkout_approval_pending""credentials_invalid""delegate_user_exists""email_already_exists"
paymentMethod.​errorMessagestring
paymentMethod.​errorDetailsstring
marketplaceIdstring

System unique identifier for the marketplace in scope, if any.

merchantIdstringrequired

System unique identifier for the merchant in scope.

paymentSourceIdstring

Payment source system identifier linked to the blocked cord

isCardBlockedbooleanrequired

Is the card currently blocked

eventTypestring(BlockedCardEventType)required
Enum"CardBlockAdded""CardBlockEnforced""CardBlockRemoved"
descriptionstringrequired
blockUserMessagestring

Message shown to the user regarding the blocked card

createdAtstring(date-time)required
]
Response
application/json
[ { "cardBlockId": "blockedsrc_aZ-9V_KvllCPqGs9", "customerDetails": {}, "purchaseDetails": {}, "paymentMethod": {}, "marketplaceId": "mktp_aZ-9UfKvllCPqGsi", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "paymentSourceId": "psrc_aZ-9UfKvllCPqGsf", "isCardBlocked": true, "eventType": "CardBlockAdded", "description": "string", "blockUserMessage": "string", "createdAt": "2019-08-24T14:15:22Z" } ]

Update Blocked Card

Request

Update actions on blocked cards.

Security
Marketplace API Key | Merchant Secret Token | Admin JWT | Merchant JWT | Marketplace JWT
Path
cardBlockIdstringrequired
Bodyapplication/jsonrequired
One of:
RemoveBlockOnCardobject(RemoveBlockOnCard1)required

Remove a block on a card.

curl -i -X PATCH \
  'https://api.sandbox.au.meetapril.io/sources/blockedcards/{cardBlockId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "RemoveBlockOnCard": {}
  }'

Responses

Bodyapplication/json
cardBlockIdstringrequired
customerDetailsobject(CustomerDetails)
purchaseDetailsobject(PurchaseDetails)
paymentMethodCardPaymentMethod (object) or DirectDebitPaymentMethod (object) or PayToPaymentMethod (object)(TransactionPaymentMethod)required
One of:
paymentMethod.​paymentMethodTypestring(PaymentMethodType1)required
Enum"Card""DirectDebit""PayTo"
paymentMethod.​cardBrandstring
paymentMethod.​cardBinstring
paymentMethod.​cardLast4string
paymentMethod.​cardFundingstring
paymentMethod.​cardIssuerstring
paymentMethod.​cardExpiryDatestring
paymentMethod.​cardCountrystring
paymentMethod.​cardCVCVerificationPassedboolean
paymentMethod.​card3DSVerificationPassedboolean
paymentMethod.​info3DSVerificationstring
paymentMethod.​walletTypestring
paymentMethod.​outcome3dsAuthenticationUnavailable (object) or FailedChallenge (object) or FailedFrictionless (object) or FailedTokenized (object) or FlowNotAttempted (object) or IncompleteChallenge (object) or LogicError (object) or NotSupported (object) or PassedChallenge (object) or PassedFrictionless (object) or PassedTokenized (object) or ResultNotAvailableError (object)(Outcome3ds)
One of:
paymentMethod.​card3DSFlowstring
paymentMethod.​cardStatementstring
paymentMethod.​cardHolderNamestring
paymentMethod.​errorCodestring(ErrorCode)
Enum"unexpected""unspecified""account_disabled""account_not_found""audience_mismatch""bad_signature""checkout_approval_pending""credentials_invalid""delegate_user_exists""email_already_exists"
paymentMethod.​errorMessagestring
paymentMethod.​errorDetailsstring
marketplaceIdstring

System unique identifier for the marketplace in scope, if any.

merchantIdstringrequired

System unique identifier for the merchant in scope.

paymentSourceIdstring

Payment source system identifier linked to the blocked cord

isCardBlockedbooleanrequired

Is the card currently blocked

eventTypestring(BlockedCardEventType)required
Enum"CardBlockAdded""CardBlockEnforced""CardBlockRemoved"
descriptionstringrequired
blockUserMessagestring

Message shown to the user regarding the blocked card

createdAtstring(date-time)required
Response
application/json
{ "cardBlockId": "blockedsrc_aZ-9V_KvllCPqGs9", "customerDetails": { "customerId": "cust_aZ-9UfKvllCPqGsa", "referenceCustomerId": "CUST-48822821", "customerName": "string", "customerEmailAddress": "lucy.diamond@star.com", "customerPhoneNumber": "+61401234567" }, "purchaseDetails": { "orderId": "ordr_aZ-9UfKvllCPqGsd", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "referenceOrderId": "ORD-12411", "amount": {}, "surchargeAmount": 0, "refundedAmount": 0, "merchantName": "string", "transactionId": "tran_aZ-9UfKvllCPqGsc", "referenceTransactionId": "string", "orderType": "online", "payType": "PayPlan", "description": "string", "orderMetadata": {}, "status": "accepted", "refundIds": [], "disputeId": "dispute_aZ-9UfKvllCPqGsg", "disputeIds": [], "paidOn": "2019-08-24", "availableOn": "2019-08-24", "parentTransactionId": {}, "referenceIssuerTransactionId": "itxn_aZ-9U_KvllCPqGsv", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }, "paymentMethod": { "paymentMethodType": "Card", "cardBrand": "string", "cardBin": "string", "cardLast4": "string", "cardFunding": "string", "cardIssuer": "string", "cardExpiryDate": "string", "cardCountry": "string", "cardCVCVerificationPassed": true, "card3DSVerificationPassed": true, "info3DSVerification": "string", "walletType": "string", "outcome3ds": {}, "card3DSFlow": "string", "cardStatement": "string", "cardHolderName": "string", "errorCode": "unexpected", "errorMessage": "string", "errorDetails": "string" }, "marketplaceId": "mktp_aZ-9UfKvllCPqGsi", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "paymentSourceId": "psrc_aZ-9UfKvllCPqGsf", "isCardBlocked": true, "eventType": "CardBlockAdded", "description": "string", "blockUserMessage": "string", "createdAt": "2019-08-24T14:15:22Z" }

Payment tokens

A payment token represents a single use reference to a source of funds that can be used to pay for an order.

Operations

Pay plans

A pay plan represents a payment where the Spenda platform has extended a loan to make a purchase that the customer pays back over one or more instalments.

  • POST /payplans/offer Create a pay plan offer for a registered and KYC'd merchant customer
  • GET /payplans Return a paginated list of matching pay plans
  • POST /payplans Create a pay plan and payment token from a successful pay plan offer
  • GET /payplans/{payPlanId} Return details of a pay plan
  • POST /payplans/max Return the maximum loan amount the given customer is currently eligible for
  • POST /payplans/parameters Calculate the pay plan parameters for the given amount and list of variants
Operations

Orders

An order captures the details of the goods or services that the customer is purchasing from the merchant.

Operations

Simulation

Sandbox only endpoints for simulating external events such as a bank transfer.

  • POST /simulation Sandbox only endpoint to simulate external events such as a bank transfer being performed
Operations

Transactions

A transaction is a payment from the perspective of a merchant. The transaction shows how much the merchant will be paid, if they have been paid already and whether there have been any refunds.

Operations

Marketplaces

A B2B2C setup where an entity with business customers (sub-merchants) uses Spenda to facilitate payments for their customers' customers.

Operations

Webhooks

Webhooks are a mechanism where merchants and marketplaces can register an endpoints against one or more events. When these events occur, a POST HTTP request is made to the registered endpoint with the event details.

  • GET /webhooks Return a paginated list of matching webhook subscriptions
  • POST /webhooks Create a new webhook subscription
  • GET /webhooks/{id} Return details of a webhook subscription
  • PATCH /webhooks/{id} Update an existing webhook subscription
Operations

Loans

Loans are payment products where credit is extended by a loan facility to a borrower. The borrower can be either an individual or a business depending on the loan product in question.

Operations

Card issuer

Endpoints related to the issuing of digital cards, typically associated with a trade account based loan.

Operations

PayTo

Operations