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

Query Digital Cards

Request

Return a paginated list of matching digital card summaries.

Security
Enterprise API Key | Marketplace API Key | Merchant Secret Token | Customer API Key | Merchant JWT | Customer JWT
Query
limitinteger(int32)

Maximum results per page. Default to 20, must be between 1 and 500.

pageinteger(int32)

Page number of results to show (starting at page 1).

sortstring

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.

statusArray of strings(DigitalCardStatus)

Filter by digitalCard status

Items Enum"Active""Cancelled"
last4string

Filter by the last 4 digits of the digital card number

customerDelegateUserIdstring

Filter by customer delegate identifier

excludeExpiredboolean

Whether to exclude expired cards

loanIdArray of strings

Filter by loan identifier

curl -i -X GET \
  'https://api.sandbox.au.meetapril.io/issuer/card?limit=0&page=0&sort=string&status=Active&last4=string&customerDelegateUserId=string&excludeExpired=true&loanId=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Matching items sorted as specified

Headers
Page-Countinteger(int64)required

Total count of pages available for current query.

Total-Record-Countinteger(int64)required

Total number of records matching the query.

Bodyapplication/jsonArray [
digitalCreditCardIdstringrequired
redactedPanstringrequired
cardBrandstring(CardBrand)required
Enum"""American Express""MasterCard""Visa""Diners Club""Discover""UnionPay""Maestro""Elo""Mir"
binstringrequired
last4stringrequired
cardHolderNamestringrequired
emailAddressstring
phoneNumberstring
validFromstring(date-time)required
validTostring(date-time)required
expiryobject(ExpiryDate)required

Card expiry month and year

expiry.​expiryMonthstringrequired
expiry.​expiryYearstringrequired
limitobject(IsoCurrencyAmount)

An amount in minor current units of a given currency.

cardLimitobject(IsoCurrencyAmount)

An amount in minor current units of a given currency.

availableBalanceobject(IsoCurrencyAmount)

An amount in minor current units of a given currency.

createdAtstring(date-time)required
creatorstringrequired
statusstring(DerivedCardStatus)required
Enum"Active""Cancelled""OutOfLifetime"
usagestring(CardUsage)
Enum"Single""Multiple"
currenciesArray of strings
metadataobject(JsonObject)required
]
Response
application/json
[ { "digitalCreditCardId": "dcard_aZ-9V_KvllCPqGs-", "redactedPan": "string", "cardBrand": "", "bin": "string", "last4": "string", "cardHolderName": "string", "emailAddress": "string", "phoneNumber": "string", "validFrom": "2019-08-24T14:15:22Z", "validTo": "2019-08-24T14:15:22Z", "expiry": {}, "limit": {}, "cardLimit": {}, "availableBalance": {}, "createdAt": "2019-08-24T14:15:22Z", "creator": "string", "status": "Active", "usage": "Single", "currencies": [], "metadata": {} } ]

Administer Digital Card

Request

Administer digital card(s).

Security
Enterprise API Key | Marketplace API Key | Merchant Secret Token | Customer API Key | Merchant JWT | Customer JWT
Headers
encryption-key-namestring
Bodyapplication/jsonrequired
One of:
CreateDigitalCardRequestMastercardobject(CreateDigitalCardRequestMastercard1)required
CreateDigitalCardRequestMastercard.​loanIdstringrequired
CreateDigitalCardRequestMastercard.​detailsobject(CardCreationDetailsDto)required
CreateDigitalCardRequestMastercard.​details.​cardHolderNamestringrequired
CreateDigitalCardRequestMastercard.​details.​emailAddressstring
CreateDigitalCardRequestMastercard.​details.​phoneNumberstring
CreateDigitalCardRequestMastercard.​details.​validFromstring(date-time)required
CreateDigitalCardRequestMastercard.​details.​validTostring(date-time)required
CreateDigitalCardRequestMastercard.​details.​limitobject(IsoCurrencyAmount)

The transaction limit for the card - the largest amount chargeable on a single transaction.

CreateDigitalCardRequestMastercard.​details.​cardLimitobject(IsoCurrencyAmount)

The card limit for the card - the maximum amount that can be outstanding on the card at any time.

CreateDigitalCardRequestMastercard.​details.​usagestring(CardUsage)

Mode of use of the card - defaults to single use

Enum"Single""Multiple"
CreateDigitalCardRequestMastercard.​details.​currenciesArray of strings

Currencies that the card is allowed to be used for; empty list means no restrictions

CreateDigitalCardRequestMastercard.​details.​metadataobject(JsonObject)required
curl -i -X POST \
  https://api.sandbox.au.meetapril.io/issuer/card \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'encryption-key-name: string' \
  -d '{
    "CreateDigitalCardRequestMastercard": {
      "loanId": "loan_aZ-9VvKvllCPqGs8",
      "details": {
        "cardHolderName": "string",
        "emailAddress": "lucy.diamond@star.com",
        "phoneNumber": "+61401234567",
        "validFrom": "2019-08-24T14:15:22Z",
        "validTo": "2019-08-24T14:15:22Z",
        "limit": {
          "minorCurrencyUnits": 0,
          "currency": "string"
        },
        "cardLimit": {
          "minorCurrencyUnits": 0,
          "currency": "string"
        },
        "usage": "Single",
        "currencies": [
          "string"
        ],
        "metadata": {}
      }
    }
  }'

Responses

Bodyapplication/json
One of:
CreateDigitalCardResponseMastercardobject(CreateDigitalCardResponseMastercard1)required
CreateDigitalCardResponseMastercard.​detailsobject(RedactedCardCreationDetailsDto)required
CreateDigitalCardResponseMastercard.​details.​digitalCreditCardIdstringrequired
CreateDigitalCardResponseMastercard.​details.​redactedPanstringrequired
CreateDigitalCardResponseMastercard.​details.​brandstring(CardBrand)required
Enum"""American Express""MasterCard""Visa""Diners Club""Discover""UnionPay""Maestro""Elo""Mir"
CreateDigitalCardResponseMastercard.​details.​cardHolderNamestringrequired
CreateDigitalCardResponseMastercard.​details.​emailAddressstring
CreateDigitalCardResponseMastercard.​details.​phoneNumberstring
CreateDigitalCardResponseMastercard.​details.​validFromstring(date-time)required
CreateDigitalCardResponseMastercard.​details.​validTostring(date-time)required
CreateDigitalCardResponseMastercard.​details.​expiryobject(ExpiryDate)required

Card expiry month and year

CreateDigitalCardResponseMastercard.​details.​expiry.​expiryMonthstringrequired
CreateDigitalCardResponseMastercard.​details.​expiry.​expiryYearstringrequired
CreateDigitalCardResponseMastercard.​details.​limitobject(IsoCurrencyAmount)

The transaction limit for the card - the largest amount chargeable on a single transaction.

CreateDigitalCardResponseMastercard.​details.​cardLimitobject(IsoCurrencyAmount)

The card limit for the card - the maximum amount that can be outstanding on the card at any time.

CreateDigitalCardResponseMastercard.​details.​availableBalanceobject(IsoCurrencyAmount)

For cards with a card limit, the current balance on the card.

CreateDigitalCardResponseMastercard.​details.​createdAtstring(date-time)required

Creation timestamp of the card

CreateDigitalCardResponseMastercard.​details.​creatorstringrequired

Creator of the card

CreateDigitalCardResponseMastercard.​details.​statusstring(DerivedCardStatus)required

Status of the card

Enum"Active""Cancelled""OutOfLifetime"
CreateDigitalCardResponseMastercard.​details.​usagestring(CardUsage)

Mode of use of the card - defaults to single use

Enum"Single""Multiple"
CreateDigitalCardResponseMastercard.​details.​currenciesArray of strings

Currencies that the card is allowed to be used for; empty list means no restrictions

CreateDigitalCardResponseMastercard.​details.​metadataobject(JsonObject)required
Response
application/json
{ "CreateDigitalCardResponseMastercard": { "details": {} } }

PayTo

Operations