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

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

Pay To Lookup Alias

Request

Returns the display name for the account alias

Security
Marketplace API Key | Merchant Public Token | Merchant Secret Token | Customer JWT | Merchant JWT | Marketplace JWT | Admin JWT
Query
aliasTypestring(AliasType)required
Enum"Phone""Email""Abn""OrganisationIdentifier"
aliasValuestringrequired
curl -i -X GET \
  'https://api.sandbox.au.meetapril.io/payto/alias?aliasType=Phone&aliasValue=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Bodyapplication/json
displayNamestringrequired

Display name linked to this alias

Response
application/json
{ "displayName": "string" }

Pay To Get Agreement State

Request

Get agreement state

Security
Marketplace API Key | Merchant Public Token | Merchant Secret Token | Customer JWT | Merchant JWT | Marketplace JWT | Admin JWT
Query
tokenstringrequired
Headers
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.

curl -i -X GET \
  'https://api.sandbox.au.meetapril.io/payto/agreement?token=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Merchant-Id: string'

Responses

Bodyapplication/json
statusstring(AgreementStatus)required
Enum"Pending""Created""Active""Suspended""Cancelled""Declined""Failed""Expired"
Response
application/json
{ "status": "Pending" }

Pay To Send Agreement

Request

Send agreement request to customer

Security
Marketplace API Key | Merchant Public Token | Merchant Secret Token | Customer JWT | Merchant JWT | Marketplace JWT | Admin JWT
Headers
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-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.

Bodyapplication/jsonrequired
customerNamestringrequired

Name associated to the account to be charged

customerAccIdentifierAlias (object) or Bban (object)(AccountIdentifier)required
One of:

Acount to be charged using PayTo network

customerAccIdentifier.​Aliasobject(Alias1)required

Alias associated with a bank account

customerAccIdentifier.​Alias.​aliasTypestring(AliasType)required
Enum"Phone""Email""Abn""OrganisationIdentifier"
customerAccIdentifier.​Alias.​valuestringrequired
termsAgreementRequestTermsOneOff (object) or AgreementRequestTermsOpen (object)(AgreementRequestTerms)required
One of:

Terms for the agreement

terms.​AgreementRequestTermsOneOffobject(AgreementRequestTermsOneOff1)required

Single-use agreement used when approving each full payment is required

terms.​AgreementRequestTermsOneOff.​amountobject(PaymentAmount)required

Amount of the payment this agreement will be used for

terms.​AgreementRequestTermsOneOff.​amount.​amountinteger(int64)required

The amount of the payment in minor currency units (eg cents for AUD)

terms.​AgreementRequestTermsOneOff.​amount.​currencystringrequired

The currency of the payment

purposestring(Purpose)

Purpose of the payment. If not specified retail will be used by default

Enum"Mortgage""Utility""Loan""DependantSupport""Gambling""Retail""Salary""Personal""Government""Pension"
curl -i -X POST \
  https://api.sandbox.au.meetapril.io/payto/agreement \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Customer-Id: string' \
  -H 'Merchant-Id: string' \
  -d '{
    "customerName": "string",
    "customerAccIdentifier": {
      "Alias": {
        "aliasType": "Phone",
        "value": "string"
      }
    },
    "terms": {
      "AgreementRequestTermsOneOff": {
        "amount": {
          "amount": 0,
          "currency": "AUD"
        }
      }
    },
    "purpose": "Mortgage"
  }'

Responses

Bodyapplication/json
tokenstringrequired
Response
application/json
{ "token": "string" }