Return a paginated list of matching orders
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
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
- Sandboxhttps://api.sandbox.au.meetapril.io/orders
- Productionhttps://api.au.meetapril.io/orders
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.sandbox.au.meetapril.io/orders?limit=0&page=0&sort=string&orderId=string&merchantId=string&orderType=online&referenceOrderId=string&orderStatus=created' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Matching items sorted as specified
A reference provided by the merchant to identify this order, such as an order number.
The un-surcharged order amount that goes on the invoice.
[ { "orderId": "ordr_aZ-9UfKvllCPqGsd", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "referenceOrderId": "ORD-12411", "amount": { … }, "surcharge": { … }, "customerEmailAddress": "string", "customerPhoneNumber": "string", "customerName": "string", "orderType": "online", "orderTypeDetails": { … }, "description": "string", "items": [ … ], "discountAmount": 0, "shipping": { … }, "billing": { … }, "metadata": {}, "status": "created", "settlementConfiguration": "default", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ]
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.
Represents an order processed in real-time, typically on an e-commerce site.
A reference provided by the merchant to identify this order, such as an order number.
The order amount in minor currency units prior to any applicable surcharges
Optional discount applied to order in minor currency units.
Merchant specific additional data associated with this order.
- Sandboxhttps://api.sandbox.au.meetapril.io/orders
- Productionhttps://api.au.meetapril.io/orders
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- CreateOnlineOrder
- CreatePayByLinkOrder
curl -i -X POST \
https://api.sandbox.au.meetapril.io/orders \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'Customer-Id: string' \
-H 'Merchant-Id: string' \
-d '{
"CreateOnlineOrder": {
"referenceOrderId": "ORD-12411",
"amount": {
"minorCurrencyUnits": 0,
"currency": "AUD"
},
"customerEmailAddress": "lucy.diamond@star.com",
"customerPhoneNumber": "string",
"description": "string",
"items": [
{
"amount": {
"minorCurrencyUnits": 0,
"currency": "string"
},
"description": "string",
"sku": "string",
"quantity": 0,
"imageUrl": "string"
}
],
"discountAmount": 0,
"shipping": {
"amount": 0,
"address": {
"line1": "string",
"line2": "string",
"city": "string",
"state": "string",
"postalCode": "string",
"country": "string"
},
"carrier": "string",
"name": "string",
"phoneNumber": "string",
"trackingNumber": "string"
},
"billing": {
"address": {
"line1": "string",
"line2": "string",
"city": "string",
"state": "string",
"postalCode": "string",
"country": "string"
},
"name": "string",
"phoneNumber": "string"
},
"metadata": {},
"parentTransactionId": {
"transactionId": "tran_aZ-9UfKvllCPqGsc"
},
"settlementConfiguration": "default"
}
}'Details of the generated order
System unique identifier for the merchant the order was created for.
A reference provided by the merchant to identify this order, such as an order number.
The un-surcharged order amount that goes on the invoice.
Merchant specific additional data associated with this order.
- OnlineOrder
- PayByLinkOrder
{ "OnlineOrder": { "order": { … } } }
Request
Pay for an order using a payment token. Make sure you read the Error Handling page as you will need to add some logic to handle a 3DS challenge for card based payments.
3DS may be required for several reasons including
- Explicitly requesting it in the request
- An eligibility requirement to establish a pay plan
- Required by the card issuer
- Confirm3DSComplete
- PayByBankTransfer
- PayByCard
- PayByDirectDebit
- PayByNetworkToken
- PayByPayTo
- PayByPaymentToken
When 3DS is required, a card based PayOrder call returns status code 200 with response type ThreeDSAuthorisationRequired containing the details needed to complete the 3DS challenge. Use this action to complete the pay order process after the 3DS challenge is complete. See 3D-Secure Utilisation for further details.
Optional reference that can be passed in when Creating a transaction.
Payment token representing the payment used to pay for this order
The ThreeDSAuthorisationRequired value returned in the body of the response from the original PayOrder call that required 3DS.
- Sandboxhttps://api.sandbox.au.meetapril.io/orders/{orderId}/pay
- Productionhttps://api.au.meetapril.io/orders/{orderId}/pay
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- Confirm3DSComplete
- PayByBankTransfer
- PayByCard
- PayByDirectDebit
- PayByNetworkToken
- PayByPayTo
- PayByPaymentToken
curl -i -X POST \
'https://api.sandbox.au.meetapril.io/orders/{orderId}/pay' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"Confirm3DSComplete": {
"referenceTransactionId": "string",
"paymentTokenId": "ptkn_aZ-9VPKvllCPqGs0",
"threeDSResponse": {
"threeDSAuthorisationId": "string"
},
"authoriseOnly": true
}
}'These are the statuses returned by the order payment API and the values displayed when merchant integrators retrieve (GET) a transaction via the API.
Note: our dashboards in most cases map these statuses to different values, but only for display purposes.
- accepted - This payment was accepted by the customer but the payment method is asynchronous (e.g.: Direct Debit, Bank Transfer), so we have to wait for the final result before we move it to either paid or failed.
- paid - This payment is successful and funds have been collected.
- pending - This payment is successful, funds have been collected from the customer, but they are pending being transferred to the merchants balance. This status is currently only used by PayPlan's since we delay the transfer of funds into a merchants balance.
- refunded - A full refund has been initiated on this payment.
- partially_refunded - A partial refund of the original payment amount has been initiated on this payment.
- failed - The attempt to collect funds from the payment method was not successful.
- cancelled - This payment has been cancelled.
- disputed - At least one charge on the payment method has been disputed.
- not_captured - The payment method has been authorised but funds are not yet captured.
- incomplete - This payment has not been completed by the customer. Currently, a transaction is only incomplete if 3DS authentication has not yet been completed. If the customer does not complete the authentication, the transaction will stay in this state.
System unique identifier for the order.
System unique identifier for the merchant the order was created for.
A reference provided by the merchant to identify this order, such as an order number.
The order amount including any surcharge passed on to the customer.
The amount in minor currency units that was surcharged to the customer.
The amount in minor currency units that has been refunded to the customer.
Business name of the merchant the order is associated with.
System unique identifier for the transaction representing this payment.
A reference provided by the merchant to identify this transaction.
A free text description of the order.
Metadata passed in when creating the order.
These are the statuses returned by the order payment API and the values displayed when merchant integrators retrieve (GET) a transaction via the API.
Note: our dashboards in most cases map these statuses to different values, but only for display purposes.
- accepted - This payment was accepted by the customer but the payment method is asynchronous (e.g.: Direct Debit, Bank Transfer), so we have to wait for the final result before we move it to either paid or failed.
- paid - This payment is successful and funds have been collected.
- pending - This payment is successful, funds have been collected from the customer, but they are pending being transferred to the merchants balance. This status is currently only used by PayPlan's since we delay the transfer of funds into a merchants balance.
- refunded - A full refund has been initiated on this payment.
- partially_refunded - A partial refund of the original payment amount has been initiated on this payment.
- failed - The attempt to collect funds from the payment method was not successful.
- cancelled - This payment has been cancelled.
- disputed - At least one charge on the payment method has been disputed.
- not_captured - The payment method has been authorised but funds are not yet captured.
- incomplete - This payment has not been completed by the customer. Currently, a transaction is only incomplete if 3DS authentication has not yet been completed. If the customer does not complete the authentication, the transaction will stay in this state.
A list of refund system unique identifiers issued against this transaction.
System unique identifiers for any disputes raised against this transaction.
The day the payment was settled with the merchant. Only set after a successful payout.
The day this payment will be available for payout to the merchant.
If linked to a another transaction, this can be set here.
If this transaction runs as a closed loop transaction, this will provide the corresponding IssuerTransactionId
Restricted field - only included if caller has access.
The order amount in minor currency units - note this includes any surcharging amount applied to the transaction
The order amount surcharge component in minor currency units
- PayOrderComplete
- ThreeDSAuthorisationRequired
{ "PayOrderComplete": { "transactionId": "tran_aZ-9UfKvllCPqGsc", "transactionStatus": "accepted", "transactionDetails": { … }, "amount": 0, "currency": "AUD", "surchargeAmount": 0, "payType": "payplan" } }
- Sandboxhttps://api.sandbox.au.meetapril.io/orders/{orderId}
- Productionhttps://api.au.meetapril.io/orders/{orderId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.sandbox.au.meetapril.io/orders/{orderId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'A reference provided by the merchant to identify this order, such as an order number.
The un-surcharged order amount that goes on the invoice.
{ "orderId": "ordr_aZ-9UfKvllCPqGsd", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "referenceOrderId": "ORD-12411", "amount": { "minorCurrencyUnits": 0, "currency": "string" }, "surcharge": { "surchargeOptions": { … }, "surchargePaidAmount": 0 }, "customerEmailAddress": "string", "customerPhoneNumber": "string", "customerName": "string", "orderType": "online", "orderTypeDetails": { "InvoiceOrderTypeDetails": { … } }, "description": "string", "items": [ { … } ], "discountAmount": 0, "shipping": { "amount": 0, "address": { … }, "carrier": "string", "name": "string", "phoneNumber": "string", "trackingNumber": "string" }, "billing": { "address": { … }, "name": "string", "phoneNumber": "string" }, "metadata": {}, "status": "created", "settlementConfiguration": "default", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }
- Sandboxhttps://api.sandbox.au.meetapril.io/orders/{orderId}
- Productionhttps://api.au.meetapril.io/orders/{orderId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://api.sandbox.au.meetapril.io/orders/{orderId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'A reference provided by the merchant to identify this order, such as an order number.
The un-surcharged order amount that goes on the invoice.
{ "orderId": "ordr_aZ-9UfKvllCPqGsd", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "referenceOrderId": "ORD-12411", "amount": { "minorCurrencyUnits": 0, "currency": "string" }, "surcharge": { "surchargeOptions": { … }, "surchargePaidAmount": 0 }, "customerEmailAddress": "string", "customerPhoneNumber": "string", "customerName": "string", "orderType": "online", "orderTypeDetails": { "InvoiceOrderTypeDetails": { … } }, "description": "string", "items": [ { … } ], "discountAmount": 0, "shipping": { "amount": 0, "address": { … }, "carrier": "string", "name": "string", "phoneNumber": "string", "trackingNumber": "string" }, "billing": { "address": { … }, "name": "string", "phoneNumber": "string" }, "metadata": {}, "status": "created", "settlementConfiguration": "default", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }
- Sandboxhttps://api.sandbox.au.meetapril.io/orders/{orderId}
- Productionhttps://api.au.meetapril.io/orders/{orderId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- UpdateReferenceOrderId
- UpdateSettlementConfiguration
curl -i -X PATCH \
'https://api.sandbox.au.meetapril.io/orders/{orderId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"UpdateReferenceOrderId": {
"referenceOrderId": "string"
}
}'A reference provided by the merchant to identify this order, such as an order number.
The un-surcharged order amount that goes on the invoice.
{ "orderId": "ordr_aZ-9UfKvllCPqGsd", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "referenceOrderId": "ORD-12411", "amount": { "minorCurrencyUnits": 0, "currency": "string" }, "surcharge": { "surchargeOptions": { … }, "surchargePaidAmount": 0 }, "customerEmailAddress": "string", "customerPhoneNumber": "string", "customerName": "string", "orderType": "online", "orderTypeDetails": { "InvoiceOrderTypeDetails": { … } }, "description": "string", "items": [ { … } ], "discountAmount": 0, "shipping": { "amount": 0, "address": { … }, "carrier": "string", "name": "string", "phoneNumber": "string", "trackingNumber": "string" }, "billing": { "address": { … }, "name": "string", "phoneNumber": "string" }, "metadata": {}, "status": "created", "settlementConfiguration": "default", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }
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