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

Get Marketplace

Request

Return details of a marketplace.

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

Responses

Bodyapplication/json
One of:
marketplaceIdstringrequired

System unique identifier for a marketplace.

readableIdentifierstringrequired

Unique URL used for dashboards. Must be 4-255 characters, lowercase, alphanumeric without any special characters such as ! @ # & ( ) – [ ] : ; ‘, ? /.

businessNamestringrequired

Business name (as linked to ABN/ACN).

websitestringrequired

Company website.

companyEmailstringrequired

Company email address.

companyPhonestringrequired

Company phone number.

merchantDashboardAccessEnabledbooleanrequired

Indicates whether marketplace merchants are able to access the merchant dashboard.

marketplaceCustomerUsersEnabledbooleanrequired

Indicates whether the marketplace supports marketplace-level customers.

bankTransfersDetailsobject(BankTransfersDetails)

Bank account details to be used in bank transfer payments.

sourceRulesArray of objects(Rule)

The rules that configure payment sources for the marketplace. Rules include surcharging, platform fee (FUTURE), etc.

Response
application/json
{ "marketplaceId": "mktp_aZ-9UfKvllCPqGsi", "readableIdentifier": "string", "businessName": "string", "website": "string", "companyEmail": "lucy.diamond@star.com", "companyPhone": "+61401234567", "merchantDashboardAccessEnabled": true, "marketplaceCustomerUsersEnabled": true, "bankTransfersDetails": { "bankAccountBsb": "string", "bankAccountNumber": "string", "payId": "string" }, "sourceRules": [ {} ] }

Upsert Marketplace Customer

Request

Marketplace customers allow marketplaces to onboard their customers once and have them available over all their sub-merchants. To set up payments for these payments, generate the merchant customer for the relevant sub-merchant using Upsert Customer

Security
Marketplace API Key | Marketplace JWT | Admin JWT
Headers
Marketplace-Idstring

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

Bodyapplication/jsonrequired
One of:
UpsertConsumerMarketplaceCustomerobject(UpsertConsumerMarketplaceCustomer1)required

Consumer marketplace customers represent individuals who will be making purchases from one or more sub-merchants of the marketplace. They are uniquely identified by emailAddress for a given marketplace.

Alpha release - Consider this endpoint experimental and very likely to change in future.

UpsertConsumerMarketplaceCustomer.​givenNamestringrequired
UpsertConsumerMarketplaceCustomer.​middleNamestring
UpsertConsumerMarketplaceCustomer.​familyNamestringrequired
UpsertConsumerMarketplaceCustomer.​emailAddressstringrequired

Email address of the customer

UpsertConsumerMarketplaceCustomer.​isVerifiedbooleanrequired

Has the phone number and email address for this customer been verified to be correct.

UpsertConsumerMarketplaceCustomer.​phoneNumberstring

Phone number of the customer

UpsertConsumerMarketplaceCustomer.​referenceCustomerIdstring

A reference provided by the merchant to identify this customer. Must be unique for the given merchant.

UpsertConsumerMarketplaceCustomer.​metadataobject(JsonObject)
curl -i -X POST \
  https://api.sandbox.au.meetapril.io/marketplaces/customer \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Marketplace-Id: string' \
  -d '{
    "UpsertConsumerMarketplaceCustomer": {
      "givenName": "string",
      "middleName": "string",
      "familyName": "string",
      "emailAddress": "lucy.diamond@star.com",
      "isVerified": true,
      "phoneNumber": "+61401234567",
      "referenceCustomerId": "CUST-48822821",
      "metadata": {}
    }
  }'

Responses

Bodyapplication/json
One of:
ConsumerMarketplaceCustomerobject(ConsumerMarketplaceCustomer1)required
ConsumerMarketplaceCustomer.​marketplaceCustomerIdstringrequired
ConsumerMarketplaceCustomer.​marketplaceIdstringrequired
ConsumerMarketplaceCustomer.​givenNamestring

Restricted field - only included if caller has access.

ConsumerMarketplaceCustomer.​middleNamestring

Restricted field - only included if caller has access.

ConsumerMarketplaceCustomer.​familyNamestring

Restricted field - only included if caller has access.

ConsumerMarketplaceCustomer.​emailAddressstring

Restricted field - only included if caller has access.

ConsumerMarketplaceCustomer.​isVerifiedbooleanrequired
ConsumerMarketplaceCustomer.​phoneNumberstring

Restricted field - only included if caller has access.

ConsumerMarketplaceCustomer.​createdAtstring(date-time)required
ConsumerMarketplaceCustomer.​updatedAtstring(date-time)required
ConsumerMarketplaceCustomer.​referenceCustomerIdstring
Response
application/json
{ "ConsumerMarketplaceCustomer": { "marketplaceCustomerId": "mktpcust_aZ-9UvKvllCPqGsp", "marketplaceId": "mktp_aZ-9UfKvllCPqGsi", "givenName": "string", "middleName": "string", "familyName": "string", "emailAddress": "lucy.diamond@star.com", "isVerified": true, "phoneNumber": "+61401234567", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "referenceCustomerId": "string" } }

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