The full plan amount
- Calculate Pay Plan Parameters
April API (3.0)
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)
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.
- GET /customers Return a paginated list of matching customers
- POST /customers Create a new customer or update the details of an existing customer
- GET /customers/{customerId} Return details of a customer
- POST /customers/kyc Perform a Know Your Customer (KYC) check on a consumer customer
- GET /customers/delegates Return a paginated list of matching customer delegates
- GET /customers/delegates/{customerDelegateId} Return details of a customer delegate
- PATCH /customers/delegates/{customerDelegateId} Various actions for updating a customer delegate such as linking to a new customer
- DELETE /customers/delegates/{customerDelegateId} Delete a customer delegate
A business or individual that uses Spenda to facilitate payments for their customers.
- GET /merchants Return a paginated list of matching merchants
- POST /merchants Create a new sub-merchant within the context of a marketplace
- GET /merchants/{merchantId} Return details of a merchant
- PATCH /merchants/{merchantId} Various actions for updating a merchant such as updating the bank account used for payouts
- GET /merchants/{merchantId}/balances Query the account balances of a merchant
- POST /merchants/{merchantId}/files Upload a document scan as part of the merchant onboarding profile
- GET /merchants/{merchantId}/files/{fileId} Get details on a merchant onboarding file
- GET /merchants/{merchantId}/applepay Get the domains registered for ApplePay for the specified merchant
- GET /merchants/{merchantId}/owners Return details of all beneficial owners for the given merchant
- POST /merchants/{merchantId}/owners Create a beneficial owner for the given merchant
- GET /merchants/{merchantId}/owners/{ownerId} Return details of a beneficial owner
- PUT /merchants/{merchantId}/owners/{ownerId} Overwrite an existing beneficial owner
- DELETE /merchants/{merchantId}/owners/{ownerId} Delete a beneficial owner
- GET /merchants/industries List all industries we currently support
A payment source represents a reusable source of funds to use for payments.
- GET /sources/{sourceId}
- DELETE /sources/{sourceId}
- POST /sources Register a payment source that may be used to pay for one or more payments
- GET /sources Return a paginated list of matching payment sources
- GET /sources/blockedcards Return a paginated list of events related to cards that have been blocked
- PATCH /sources/blockedcards/{cardBlockId} Update actions on blocked cards
A payment token represents a single use reference to a source of funds that can be used to pay for an order.
- POST /tokens Generate a pay-in-full payment token based on the provided payment source
- GET /tokens/{paymentTokenId} Get the details for a pay-in-full payment token
- POST /tokens/{merchantId}/surchargequote Calculates the surcharged amounts for the specified payment type
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
Request
Create a pay plan offer for a registered and KYC'd merchant customer. The offer returned must be used to create a pay plan within 10 minutes. After this point, generate a new offer by calling this endpoint again.
If called with a customer JWT, the pay plan is created for that customer, otherwise the customer must be provided via the Customer-Id request header.
An optional amount that the customer will pay up front in minor currency units (e.g. cents for AUD)
The variant of the plan to construct. This implies the number of instalments; the minimum initialPayment expected; and the frequency of payments (e.g. fortnightly, weekly, etc.)
- Sandboxhttps://api.sandbox.au.meetapril.io/payplans/offer
- Productionhttps://api.au.meetapril.io/payplans/offer
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.sandbox.au.meetapril.io/payplans/offer \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'Customer-Id: string' \
-d '{
"amount": {
"minorCurrencyUnits": 0,
"currency": "AUD"
},
"initialPayment": 0,
"payPlanVariant": "payplan_fortnight_25_25_25_25",
"metadata": {}
}'Details of the pay plan offered to the customer
System unique identifier for the merchant the pay plan was created for.
System unique identifier for the merchant customer who owns the pay plan.
Indicates that this is a revision (counter-offer) of a payment schedule proposed by the merchant customer.
When true, 3DS must be requested when paying for the order.
The parameters of the offered pay plan. If empty, the pay plan was declined outright.
{ "offerDetails": { "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "customerId": "cust_aZ-9UfKvllCPqGsa", "isCounterOffer": true, "threeDSecureRequired": true, "payPlanParameters": { … }, "createdAt": "2019-08-24T14:15:22Z" }, "offerVerificationToken": "string", "message": "string" }
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.
Filter by pay plan state
Filter by pay plan variant
- Sandboxhttps://api.sandbox.au.meetapril.io/payplans
- Productionhttps://api.au.meetapril.io/payplans
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.sandbox.au.meetapril.io/payplans?limit=0&page=0&sort=string&customerId=string&merchantId=string&payPlanState=Created&payPlanVariant=payplan_fortnight_25_25_25_25' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Matching items sorted as specified
These are all the statuses a pay plan can be in.
- Created - The pay plan object has been created, but has not been successfully associated with an order yet. No payment or money transfers will occur when the pay plan is in this state.
- Active - The pay plan has successfully been established, the initial payment, if any, has been received and one or more instalments are yet to be paid.
- Completed - The payment plan has been completely paid, including any fees/penalties.
- InDefault - The plan is overdue and has not been paid after several soft collection attempts.
The full plan amount
The surcharge passed to the customer for creating this pay plan in minor currency units.
The fee charged for creating this pay plan in minor currency units.
The variant of the plan to construct. This implies the number of instalments; the minimum initialPayment expected; and the frequency of payments (e.g. fortnightly, weekly, etc.)
The outstanding amount still to be paid on the plan in minor currency units.
The type of payment source used to pay off the plan. Not present for source-less methods, such as bank transfers.
If set, this is the amount that was expected to be paid on the last scheduled instalment but was not in minor currency units.
Details necessary to pay this pay plan via bank transfer. Only present if payment method is enabled for this merchant
[ { "payPlanId": "plan_aZ-9UfKvllCPqGsb", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "customerId": "cust_aZ-9UfKvllCPqGsa", "state": "Created", "amount": { … }, "surchargeAmount": 0, "platformFee": 0, "taxAmount": 0, "payPlanVariant": "payplan_fortnight_25_25_25_25", "nextInstalmentDate": "2019-08-24T14:15:22Z", "nextInstalment": 3, "planAmountOutstanding": 0, "paymentSourceType": "Card", "merchantOrderId": "ordr_aZ-9UfKvllCPqGsd", "transactionId": "tran_aZ-9UfKvllCPqGsc", "charges": [ … ], "refunds": [ … ], "isRefunded": true, "isOverdue": true, "overdueAmount": 0, "overdueAt": "2019-08-24T14:15:22Z", "bankTransferDetails": { … }, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ]
Request
Create a pay plan and payment token from a successful pay plan offer. The payment token can be used to pay for an order for the matching amount and merchant.
If called with a customer JWT, the pay plan is created for that customer, otherwise the customer must be provided via the Customer-Id request header.
Has the customer accepted the terms and conditions of the pay plan
Details of the pay plan offered to the customer
System unique identifier for the merchant the pay plan was created for.
System unique identifier for the merchant customer who owns the pay plan.
Indicates that this is a revision (counter-offer) of a payment schedule proposed by the merchant customer.
When true, 3DS must be requested when paying for the order.
The parameters of the offered pay plan. If empty, the pay plan was declined outright.
3DS session id, optional as it is only used in extended 3DS scenarios such as Cardinal 3DS2, which performs an extended device data check cycle returning a session id that is passed to the backend as part of the payment token data
- Sandboxhttps://api.sandbox.au.meetapril.io/payplans
- Productionhttps://api.au.meetapril.io/payplans
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.sandbox.au.meetapril.io/payplans \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"termsAndConditionsAccepted": true,
"offerDetails": {
"merchantId": "mcht_aZ-9UfKvllCPqGsZ",
"customerId": "cust_aZ-9UfKvllCPqGsa",
"isCounterOffer": true,
"threeDSecureRequired": true,
"payPlanParameters": {
"amount": {
"minorCurrencyUnits": 0,
"currency": "AUD"
},
"initialPayment": 0,
"instalmentLength": 0,
"instalmentFrequency": "Weekly",
"proposedSchedule": [
{
"at": "2019-08-24T14:15:22Z",
"amount": 0
}
],
"payPlanVariant": "payplan_fortnight_25_25_25_25"
},
"createdAt": "2019-08-24T14:15:22Z"
},
"offerVerificationToken": "string",
"paymentSource": {
"BankTransfer": {}
},
"threeDsSessionId": "string",
"surchargeRequirement": {
"surchargeQuote": {
"unsurchargedAmount": 0,
"surchargeAmount": 0,
"totalAmount": 0,
"paymentMethod": {
"cardAttributes": {
"currency": "string",
"country": "AF",
"funding": "credit",
"prepaid": true,
"brand": "",
"issuer": "string",
"productType": "CP",
"schemeProduct": "AC000",
"bin": "string"
}
},
"summary": "string",
"quoteVerificationToken": "string"
}
}
}'Details of the newly created pay plan
System unique identifier for the merchant the pay plan was created for
System unique identifier for the merchant customer who owns the pay plan.
These are all the statuses a pay plan can be in.
- Created - The pay plan object has been created, but has not been successfully associated with an order yet. No payment or money transfers will occur when the pay plan is in this state.
- Active - The pay plan has successfully been established, the initial payment, if any, has been received and one or more instalments are yet to be paid.
- Completed - The payment plan has been completely paid, including any fees/penalties.
- InDefault - The plan is overdue and has not been paid after several soft collection attempts.
The full plan amount
The surcharge passed to the customer for creating this pay plan in minor currency units.
The fee charged for creating this pay plan in minor currency units.
Tax owed by the merchant on the fees in minor currency units.
The variant of the plan to construct. This implies the number of instalments; the minimum initialPayment expected; and the frequency of payments (e.g. fortnightly, weekly, etc.)
The next computed date in which an instalment should be charged.
The outstanding amount still to be paid on the plan in minor currency units.
The type of payment source used to pay off the plan. Not present for source-less methods, such as bank transfers.
System unique identifier for the transaction corresponding to this plan.
If set, this is the amount that was expected to be paid on the last scheduled instalment but was not in minor currency units.
Details necessary to pay this pay plan via bank transfer. Only present if payment method is enabled for this merchant
{ "payPlan": { "payPlanId": "plan_aZ-9UfKvllCPqGsb", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "customerId": "cust_aZ-9UfKvllCPqGsa", "state": "Created", "amount": { … }, "surchargeAmount": 0, "platformFee": 0, "taxAmount": 0, "payPlanVariant": "payplan_fortnight_25_25_25_25", "nextInstalmentDate": "2019-08-24T14:15:22Z", "nextInstalment": 3, "planAmountOutstanding": 0, "paymentSourceType": "Card", "merchantOrderId": "ordr_aZ-9UfKvllCPqGsd", "transactionId": "tran_aZ-9UfKvllCPqGsc", "charges": [ … ], "refunds": [ … ], "isRefunded": true, "isOverdue": true, "overdueAmount": 0, "overdueAt": "2019-08-24T14:15:22Z", "bankTransferDetails": { … }, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }, "paymentTokenId": "ptkn_aZ-9VPKvllCPqGs0" }
- Sandboxhttps://api.sandbox.au.meetapril.io/payplans/{payPlanId}
- Productionhttps://api.au.meetapril.io/payplans/{payPlanId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.sandbox.au.meetapril.io/payplans/{payPlanId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'These are all the statuses a pay plan can be in.
- Created - The pay plan object has been created, but has not been successfully associated with an order yet. No payment or money transfers will occur when the pay plan is in this state.
- Active - The pay plan has successfully been established, the initial payment, if any, has been received and one or more instalments are yet to be paid.
- Completed - The payment plan has been completely paid, including any fees/penalties.
- InDefault - The plan is overdue and has not been paid after several soft collection attempts.
The full plan amount
The surcharge passed to the customer for creating this pay plan in minor currency units.
The fee charged for creating this pay plan in minor currency units.
The variant of the plan to construct. This implies the number of instalments; the minimum initialPayment expected; and the frequency of payments (e.g. fortnightly, weekly, etc.)
The outstanding amount still to be paid on the plan in minor currency units.
The type of payment source used to pay off the plan. Not present for source-less methods, such as bank transfers.
If set, this is the amount that was expected to be paid on the last scheduled instalment but was not in minor currency units.
Details necessary to pay this pay plan via bank transfer. Only present if payment method is enabled for this merchant
{ "payPlanId": "plan_aZ-9UfKvllCPqGsb", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "customerId": "cust_aZ-9UfKvllCPqGsa", "state": "Created", "amount": { "minorCurrencyUnits": 0, "currency": "AUD" }, "surchargeAmount": 0, "platformFee": 0, "taxAmount": 0, "payPlanVariant": "payplan_fortnight_25_25_25_25", "nextInstalmentDate": "2019-08-24T14:15:22Z", "nextInstalment": 3, "planAmountOutstanding": 0, "paymentSourceType": "Card", "merchantOrderId": "ordr_aZ-9UfKvllCPqGsd", "transactionId": "tran_aZ-9UfKvllCPqGsc", "charges": [ { … } ], "refunds": [ { … } ], "isRefunded": true, "isOverdue": true, "overdueAmount": 0, "overdueAt": "2019-08-24T14:15:22Z", "bankTransferDetails": { "reference": "string", "bankAccountNumber": "string", "bankAccountBsb": "string", "payId": "string", "metadata": { … } }, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }
The pay plan variant to be used - defaults to the first configured value for the merchant or payplan_fortnight_25_25_25_25
- Sandboxhttps://api.sandbox.au.meetapril.io/payplans/max
- Productionhttps://api.au.meetapril.io/payplans/max
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.sandbox.au.meetapril.io/payplans/max \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'Customer-Id: string' \
-d '{
"currency": "AUD",
"payPlanVariant": "payplan_fortnight_25_25_25_25"
}'{ "amount": { "minorCurrencyUnits": 0, "currency": "AUD" }, "summary": "string" }
Request
Calculate the pay plan parameters for the given amount and list of variants.
Beta release - This endpoint is close to being finalised but non-backward compatible changes to parameters and behaviour may still occur.
The full order amount
The variants of the plan to calculate parameters for.
- Sandboxhttps://api.sandbox.au.meetapril.io/payplans/parameters
- Productionhttps://api.au.meetapril.io/payplans/parameters
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.sandbox.au.meetapril.io/payplans/parameters \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'Merchant-Id: string' \
-d '{
"amount": {
"minorCurrencyUnits": 0,
"currency": "AUD"
},
"payPlanVariants": [
"payplan_fortnight_25_25_25_25"
],
"payInFullAmount": 0
}'{ "parameters": [ { … } ] }
An order captures the details of the goods or services that the customer is purchasing from the merchant.
- GET /orders Return a paginated list of matching orders
- POST /orders Creates a new order
- POST /orders/{orderId}/pay Pay for an order using a payment token
- GET /orders/{orderId} Retrieves an order
- DELETE /orders/{orderId} Cancels an order, invalidating it from being payable
- PATCH /orders/{orderId} Actions for modifying an existing order
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
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.
- GET /transactions/{transactionId} Return details of a transaction
- GET /transactions Return a paginated list of matching transactions
- PATCH /transactions/{transactionId} Various actions for updating a transaction such as issuing a refund
- POST /transactions/payouts Request to create a manual payout for a merchant
- GET /transactions/payouts Return a paginated list of matching payout summaries
- GET /transactions/payouts/{payoutId} Return an aggregated breakdown of the money movements included in the payout along with details of the disbursement itself
- GET /transactions/invoices Return a paginated list of matching merchant invoices
- GET /transactions/invoices/{invoiceId} Return an aggregated breakdown of the money movements included in the invoice along with billing details
- GET /transactions/invoices/{invoiceId}/pdf Return a PDF of the merchant invoice intended to be sent to the payer merchant
- GET /transactions/settlement Return a paginated list of all settlement entries matching the given search criteria
- GET /transactions/settlement/report Return a list of all settlement entries matching the given search criteria
- GET /transactions/disputes Return a paginated list of all disputes matching the given search criteria
- GET /transactions/refunds Return a paginated list of matching refunds
A B2B2C setup where an entity with business customers (sub-merchants) uses Spenda to facilitate payments for their customers' customers.
- GET /marketplaces/{marketplaceId} Return details of a marketplace
- POST /marketplaces/customer Marketplace customers allow marketplaces to onboard their customers once and have them available over all their sub-merchants
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
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.
- GET /loans Return a paginated list of matching loan summaries
- GET /loans/statements/{loanStatementId} Return a loan statement summary
- GET /loans/statements Return a paginated list of matching loan statement summaries
- GET /loans/statements/entries Return a paginated list of matching loan statement entries
- GET /loans/enterprise/statements/{loanStatementId}/download Return a loan statement report in either CSV, PDF or XML format
- GET /loans/statements/entries/report Return a list of all loan statement entries matching the given search criteria
Endpoints related to the issuing of digital cards, typically associated with a trade account based loan.
- POST /issuer/card Administer digital card(s)
- GET /issuer/card Return a paginated list of matching digital card summaries