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

Sign In Customer

Request

Sign-in from a backend service on behalf of a consumer customer (B2C) or customer delegate (B2B). Used by custom integrations and e-commerce plugins as a form of single-sign-on for the checkout. If the customer has been authenticated with the merchant's website, this lets them also authenticate a known customer with April. This is a pre-requisite for using the checkout for a B2B customer.

For both B2B and B2C customers having an authenticated session with the checkout also unlocks access to saved cards as a payment source.

Note merchants need to have been registered as supporting B2B customer when onboarded to be able to support B2B customers in the checkout.

Security
Marketplace API Key | Merchant Secret Token | Pay By Link Token
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.

Bodyapplication/jsonrequired
One of:
SignInConsumerobject(SignInConsumer1)required

Sign in on behalf of a B2C consumer customer.

SignInConsumer.​customerIdstringrequired
curl -i -X POST \
  https://api.sandbox.au.meetapril.io/auth/signin \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Merchant-Id: string' \
  -d '{
    "SignInConsumer": {
      "customerId": "cust_aZ-9UfKvllCPqGsa"
    }
  }'

Responses

Bodyapplication/json
customerIdstringrequired

System unique identifier for the customer

customerDelegateIdstring

System unique identifier for the customer delegate

customTokenstringrequired

A custom token that can be provided to the checkout.

Response
application/json
{ "customerId": "cust_aZ-9UfKvllCPqGsa", "customerDelegateId": "custd_aZ-9VPKvllCPqGs2", "customToken": "string" }

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