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

Create Pay Plan Offer

Request

Create a pay plan offer for a registered and KYC'd merchant customer. The offer returned must be used to create a pay plan within 10 minutes. After this point, generate a new offer by calling this endpoint again.

If called with a customer JWT, the pay plan is created for that customer, otherwise the customer must be provided via the Customer-Id request header.

Security
Marketplace API Key | Merchant Public Token | Merchant Secret Token | Customer JWT | Merchant JWT | Marketplace JWT
Headers
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
amountobject(CurrencyAmount)required

The full plan amount

amount.​minorCurrencyUnitsinteger(int64)required

The amount in minor currency units (e.g. cents for AUD).

amount.​currencystringrequired

The currency of the given amount as a 3 letter ISO code.

initialPaymentinteger(int64)

An optional amount that the customer will pay up front in minor currency units (e.g. cents for AUD)

payPlanVariantstring(PayPlanVariant)required

The variant of the plan to construct. This implies the number of instalments; the minimum initialPayment expected; and the frequency of payments (e.g. fortnightly, weekly, etc.)

Enum"payplan_fortnight_25_25_25_25""payplan_4_weekly_payments""payplan_8_weekly_payments""payplan_26_fortnightly_payments""payplan_52_weekly_payments""payplan_2_monthly_payments""payplan_3_monthly_payments""payplan_4_monthly_payments""payplan_5_monthly_payments""payplan_6_monthly_payments"
metadataobject(JsonObject)

An optional data structure including additional customer data that could influence the offer outcome. Only used if agreed up front between the payment system and the merchant. Independent from metadata provided during order creation.

curl -i -X POST \
  https://api.sandbox.au.meetapril.io/payplans/offer \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Customer-Id: string' \
  -d '{
    "amount": {
      "minorCurrencyUnits": 0,
      "currency": "AUD"
    },
    "initialPayment": 0,
    "payPlanVariant": "payplan_fortnight_25_25_25_25",
    "metadata": {}
  }'

Responses

Bodyapplication/json
offerDetailsobject(OfferDetails)required

Details of the pay plan offered to the customer

offerDetails.​merchantIdstringrequired

System unique identifier for the merchant the pay plan was created for.

offerDetails.​customerIdstringrequired

System unique identifier for the merchant customer who owns the pay plan.

offerDetails.​isCounterOfferbooleanrequired

Indicates that this is a revision (counter-offer) of a payment schedule proposed by the merchant customer.

offerDetails.​threeDSecureRequiredbooleanrequired

When true, 3DS must be requested when paying for the order.

offerDetails.​payPlanParametersobject(PayPlanParameters)

The parameters of the offered pay plan. If empty, the pay plan was declined outright.

offerDetails.​createdAtstring(date-time)required

When the time limited offer was generated.

offerVerificationTokenstringrequired

Tamper detection digital signature

messagestring

An explanation message that can be presented to the customer

Response
application/json
{ "offerDetails": { "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "customerId": "cust_aZ-9UfKvllCPqGsa", "isCounterOffer": true, "threeDSecureRequired": true, "payPlanParameters": {}, "createdAt": "2019-08-24T14:15:22Z" }, "offerVerificationToken": "string", "message": "string" }

Query Pay Plans

Request

Return a paginated list of matching pay plans.

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

customerIdArray of strings

Filter by customer identifier

merchantIdArray of strings

Filter by merchant identifier

payPlanStateArray of strings(PayPlanState)

Filter by pay plan state

Items Enum"Created""Active""Completed""InDefault"
payPlanVariantArray of strings(PayPlanVariant)

Filter by pay plan variant

Items Enum"payplan_fortnight_25_25_25_25""payplan_4_weekly_payments""payplan_8_weekly_payments""payplan_26_fortnightly_payments""payplan_52_weekly_payments""payplan_2_monthly_payments""payplan_3_monthly_payments""payplan_4_monthly_payments""payplan_5_monthly_payments""payplan_6_monthly_payments"
curl -i -X GET \
  'https://api.sandbox.au.meetapril.io/payplans?limit=0&page=0&sort=string&customerId=string&merchantId=string&payPlanState=Created&payPlanVariant=payplan_fortnight_25_25_25_25' \
  -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 [
payPlanIdstringrequired

System unique identifier for the pay plan

merchantIdstringrequired

System unique identifier for the merchant the pay plan was created for

customerIdstringrequired

System unique identifier for the merchant customer who owns the pay plan.

statestring(PayPlanState)required

These are all the statuses a pay plan can be in.

  • Created - The pay plan object has been created, but has not been successfully associated with an order yet. No payment or money transfers will occur when the pay plan is in this state.
  • Active - The pay plan has successfully been established, the initial payment, if any, has been received and one or more instalments are yet to be paid.
  • Completed - The payment plan has been completely paid, including any fees/penalties.
  • InDefault - The plan is overdue and has not been paid after several soft collection attempts.
Enum"Created""Active""Completed""InDefault"
amountobject(CurrencyAmount)required

The full plan amount

amount.​minorCurrencyUnitsinteger(int64)required

The amount in minor currency units (e.g. cents for AUD).

amount.​currencystringrequired

The currency of the given amount as a 3 letter ISO code.

surchargeAmountinteger(int64)required

The surcharge passed to the customer for creating this pay plan in minor currency units.

platformFeeinteger(int64)required

The fee charged for creating this pay plan in minor currency units.

taxAmountinteger(int64)required

Tax owed by the merchant on the fees in minor currency units.

payPlanVariantstring(PayPlanVariant)required

The variant of the plan to construct. This implies the number of instalments; the minimum initialPayment expected; and the frequency of payments (e.g. fortnightly, weekly, etc.)

Enum"payplan_fortnight_25_25_25_25""payplan_4_weekly_payments""payplan_8_weekly_payments""payplan_26_fortnightly_payments""payplan_52_weekly_payments""payplan_2_monthly_payments""payplan_3_monthly_payments""payplan_4_monthly_payments""payplan_5_monthly_payments""payplan_6_monthly_payments"
nextInstalmentDatestring(date-time)

The next computed date in which an instalment should be charged.

nextInstalmentinteger(int32)

The instalment number of the next instalment.

planAmountOutstandinginteger(int64)required

The outstanding amount still to be paid on the plan in minor currency units.

paymentSourceTypestring(PaymentSourceType)

The type of payment source used to pay off the plan. Not present for source-less methods, such as bank transfers.

Enum"Card""DirectDebit""PayTo"
merchantOrderIdstring

System unique identifier for the order corresponding to this plan.

transactionIdstring

System unique identifier for the transaction corresponding to this plan.

chargesArray of objects(Charge)

All charges including failed attempts made on the pay plan.

refundsArray of objects(Refund)

All refunds applied to the pay plan.

isRefundedbooleanrequired

Has the pay plan been fully refunded.

isOverduebooleanrequired

Is the pay plan overdue.

overdueAmountinteger(int64)

If set, this is the amount that was expected to be paid on the last scheduled instalment but was not in minor currency units.

overdueAtstring(date-time)

If set, when the pay plan became overdue.

bankTransferDetailsobject(BankTransferDetails)

Details necessary to pay this pay plan via bank transfer. Only present if payment method is enabled for this merchant

createdAtstring(date-time)required

When the pay plan was created.

updatedAtstring(date-time)required

When the pay plan was last updated.

]
Response
application/json
[ { "payPlanId": "plan_aZ-9UfKvllCPqGsb", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "customerId": "cust_aZ-9UfKvllCPqGsa", "state": "Created", "amount": {}, "surchargeAmount": 0, "platformFee": 0, "taxAmount": 0, "payPlanVariant": "payplan_fortnight_25_25_25_25", "nextInstalmentDate": "2019-08-24T14:15:22Z", "nextInstalment": 3, "planAmountOutstanding": 0, "paymentSourceType": "Card", "merchantOrderId": "ordr_aZ-9UfKvllCPqGsd", "transactionId": "tran_aZ-9UfKvllCPqGsc", "charges": [], "refunds": [], "isRefunded": true, "isOverdue": true, "overdueAmount": 0, "overdueAt": "2019-08-24T14:15:22Z", "bankTransferDetails": {}, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ]

Create Pay Plan

Request

Create a pay plan and payment token from a successful pay plan offer. The payment token can be used to pay for an order for the matching amount and merchant.

If called with a customer JWT, the pay plan is created for that customer, otherwise the customer must be provided via the Customer-Id request header.

Security
Marketplace API Key | Merchant Public Token | Merchant Secret Token | Customer JWT | Merchant JWT | Marketplace JWT
Bodyapplication/jsonrequired
termsAndConditionsAcceptedbooleanrequired

Has the customer accepted the terms and conditions of the pay plan

offerDetailsobject(OfferDetails)required

Details of the pay plan offered to the customer

offerDetails.​merchantIdstringrequired

System unique identifier for the merchant the pay plan was created for.

offerDetails.​customerIdstringrequired

System unique identifier for the merchant customer who owns the pay plan.

offerDetails.​isCounterOfferbooleanrequired

Indicates that this is a revision (counter-offer) of a payment schedule proposed by the merchant customer.

offerDetails.​threeDSecureRequiredbooleanrequired

When true, 3DS must be requested when paying for the order.

offerDetails.​payPlanParametersobject(PayPlanParameters)

The parameters of the offered pay plan. If empty, the pay plan was declined outright.

offerDetails.​createdAtstring(date-time)required

When the time limited offer was generated.

offerVerificationTokenstringrequired

Tamper detection digital signature

paymentSourceBankTransfer (object) or Card (object) or SavedPaymentSource (object)(PaymentSource)required
One of:

Details of the initial payment method to be used for the pay plan.

paymentSource.​BankTransferobject(BankTransfer2)required

Payment method is via bank transfer.

threeDsSessionIdstring

3DS session id, optional as it is only used in extended 3DS scenarios such as Cardinal 3DS2, which performs an extended device data check cycle returning a session id that is passed to the backend as part of the payment token data

surchargeRequirementSurchargeQuoted (object) or SurchargeSpecified (object)(SurchargeRequirement)
One of:

Specifies the options for surcharging, if required, defaults to no surcharge.

curl -i -X POST \
  https://api.sandbox.au.meetapril.io/payplans \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "termsAndConditionsAccepted": true,
    "offerDetails": {
      "merchantId": "mcht_aZ-9UfKvllCPqGsZ",
      "customerId": "cust_aZ-9UfKvllCPqGsa",
      "isCounterOffer": true,
      "threeDSecureRequired": true,
      "payPlanParameters": {
        "amount": {
          "minorCurrencyUnits": 0,
          "currency": "AUD"
        },
        "initialPayment": 0,
        "instalmentLength": 0,
        "instalmentFrequency": "Weekly",
        "proposedSchedule": [
          {
            "at": "2019-08-24T14:15:22Z",
            "amount": 0
          }
        ],
        "payPlanVariant": "payplan_fortnight_25_25_25_25"
      },
      "createdAt": "2019-08-24T14:15:22Z"
    },
    "offerVerificationToken": "string",
    "paymentSource": {
      "BankTransfer": {}
    },
    "threeDsSessionId": "string",
    "surchargeRequirement": {
      "surchargeQuote": {
        "unsurchargedAmount": 0,
        "surchargeAmount": 0,
        "totalAmount": 0,
        "paymentMethod": {
          "cardAttributes": {
            "currency": "string",
            "country": "AF",
            "funding": "credit",
            "prepaid": true,
            "brand": "",
            "issuer": "string",
            "productType": "CP",
            "schemeProduct": "AC000",
            "bin": "string"
          }
        },
        "summary": "string",
        "quoteVerificationToken": "string"
      }
    }
  }'

Responses

Bodyapplication/json
payPlanobject(PayPlanResponse)required

Details of the newly created pay plan

payPlan.​payPlanIdstringrequired

System unique identifier for the pay plan

payPlan.​merchantIdstringrequired

System unique identifier for the merchant the pay plan was created for

payPlan.​customerIdstringrequired

System unique identifier for the merchant customer who owns the pay plan.

payPlan.​statestring(PayPlanState)required

These are all the statuses a pay plan can be in.

  • Created - The pay plan object has been created, but has not been successfully associated with an order yet. No payment or money transfers will occur when the pay plan is in this state.
  • Active - The pay plan has successfully been established, the initial payment, if any, has been received and one or more instalments are yet to be paid.
  • Completed - The payment plan has been completely paid, including any fees/penalties.
  • InDefault - The plan is overdue and has not been paid after several soft collection attempts.
Enum"Created""Active""Completed""InDefault"
payPlan.​amountobject(CurrencyAmount)required

The full plan amount

payPlan.​amount.​minorCurrencyUnitsinteger(int64)required

The amount in minor currency units (e.g. cents for AUD).

payPlan.​amount.​currencystringrequired

The currency of the given amount as a 3 letter ISO code.

payPlan.​surchargeAmountinteger(int64)required

The surcharge passed to the customer for creating this pay plan in minor currency units.

payPlan.​platformFeeinteger(int64)required

The fee charged for creating this pay plan in minor currency units.

payPlan.​taxAmountinteger(int64)required

Tax owed by the merchant on the fees in minor currency units.

payPlan.​payPlanVariantstring(PayPlanVariant)required

The variant of the plan to construct. This implies the number of instalments; the minimum initialPayment expected; and the frequency of payments (e.g. fortnightly, weekly, etc.)

Enum"payplan_fortnight_25_25_25_25""payplan_4_weekly_payments""payplan_8_weekly_payments""payplan_26_fortnightly_payments""payplan_52_weekly_payments""payplan_2_monthly_payments""payplan_3_monthly_payments""payplan_4_monthly_payments""payplan_5_monthly_payments""payplan_6_monthly_payments"
payPlan.​nextInstalmentDatestring(date-time)

The next computed date in which an instalment should be charged.

payPlan.​nextInstalmentinteger(int32)

The instalment number of the next instalment.

payPlan.​planAmountOutstandinginteger(int64)required

The outstanding amount still to be paid on the plan in minor currency units.

payPlan.​paymentSourceTypestring(PaymentSourceType)

The type of payment source used to pay off the plan. Not present for source-less methods, such as bank transfers.

Enum"Card""DirectDebit""PayTo"
payPlan.​merchantOrderIdstring

System unique identifier for the order corresponding to this plan.

payPlan.​transactionIdstring

System unique identifier for the transaction corresponding to this plan.

payPlan.​chargesArray of objects(Charge)

All charges including failed attempts made on the pay plan.

payPlan.​refundsArray of objects(Refund)

All refunds applied to the pay plan.

payPlan.​isRefundedbooleanrequired

Has the pay plan been fully refunded.

payPlan.​isOverduebooleanrequired

Is the pay plan overdue.

payPlan.​overdueAmountinteger(int64)

If set, this is the amount that was expected to be paid on the last scheduled instalment but was not in minor currency units.

payPlan.​overdueAtstring(date-time)

If set, when the pay plan became overdue.

payPlan.​bankTransferDetailsobject(BankTransferDetails)

Details necessary to pay this pay plan via bank transfer. Only present if payment method is enabled for this merchant

payPlan.​createdAtstring(date-time)required

When the pay plan was created.

payPlan.​updatedAtstring(date-time)required

When the pay plan was last updated.

paymentTokenIdstringrequired

Payment token representing this pay plan used to pay for an order

Response
application/json
{ "payPlan": { "payPlanId": "plan_aZ-9UfKvllCPqGsb", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "customerId": "cust_aZ-9UfKvllCPqGsa", "state": "Created", "amount": {}, "surchargeAmount": 0, "platformFee": 0, "taxAmount": 0, "payPlanVariant": "payplan_fortnight_25_25_25_25", "nextInstalmentDate": "2019-08-24T14:15:22Z", "nextInstalment": 3, "planAmountOutstanding": 0, "paymentSourceType": "Card", "merchantOrderId": "ordr_aZ-9UfKvllCPqGsd", "transactionId": "tran_aZ-9UfKvllCPqGsc", "charges": [], "refunds": [], "isRefunded": true, "isOverdue": true, "overdueAmount": 0, "overdueAt": "2019-08-24T14:15:22Z", "bankTransferDetails": {}, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }, "paymentTokenId": "ptkn_aZ-9VPKvllCPqGs0" }

Get Pay Plan

Request

Return details of a pay plan.

Security
Marketplace API Key | Merchant Secret Token | Admin JWT | Marketplace JWT | Merchant JWT
Path
payPlanIdstringrequired
curl -i -X GET \
  'https://api.sandbox.au.meetapril.io/payplans/{payPlanId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Bodyapplication/json
payPlanIdstringrequired

System unique identifier for the pay plan

merchantIdstringrequired

System unique identifier for the merchant the pay plan was created for

customerIdstringrequired

System unique identifier for the merchant customer who owns the pay plan.

statestring(PayPlanState)required

These are all the statuses a pay plan can be in.

  • Created - The pay plan object has been created, but has not been successfully associated with an order yet. No payment or money transfers will occur when the pay plan is in this state.
  • Active - The pay plan has successfully been established, the initial payment, if any, has been received and one or more instalments are yet to be paid.
  • Completed - The payment plan has been completely paid, including any fees/penalties.
  • InDefault - The plan is overdue and has not been paid after several soft collection attempts.
Enum"Created""Active""Completed""InDefault"
amountobject(CurrencyAmount)required

The full plan amount

amount.​minorCurrencyUnitsinteger(int64)required

The amount in minor currency units (e.g. cents for AUD).

amount.​currencystringrequired

The currency of the given amount as a 3 letter ISO code.

surchargeAmountinteger(int64)required

The surcharge passed to the customer for creating this pay plan in minor currency units.

platformFeeinteger(int64)required

The fee charged for creating this pay plan in minor currency units.

taxAmountinteger(int64)required

Tax owed by the merchant on the fees in minor currency units.

payPlanVariantstring(PayPlanVariant)required

The variant of the plan to construct. This implies the number of instalments; the minimum initialPayment expected; and the frequency of payments (e.g. fortnightly, weekly, etc.)

Enum"payplan_fortnight_25_25_25_25""payplan_4_weekly_payments""payplan_8_weekly_payments""payplan_26_fortnightly_payments""payplan_52_weekly_payments""payplan_2_monthly_payments""payplan_3_monthly_payments""payplan_4_monthly_payments""payplan_5_monthly_payments""payplan_6_monthly_payments"
nextInstalmentDatestring(date-time)

The next computed date in which an instalment should be charged.

nextInstalmentinteger(int32)

The instalment number of the next instalment.

planAmountOutstandinginteger(int64)required

The outstanding amount still to be paid on the plan in minor currency units.

paymentSourceTypestring(PaymentSourceType)

The type of payment source used to pay off the plan. Not present for source-less methods, such as bank transfers.

Enum"Card""DirectDebit""PayTo"
merchantOrderIdstring

System unique identifier for the order corresponding to this plan.

transactionIdstring

System unique identifier for the transaction corresponding to this plan.

chargesArray of objects(Charge)

All charges including failed attempts made on the pay plan.

refundsArray of objects(Refund)

All refunds applied to the pay plan.

isRefundedbooleanrequired

Has the pay plan been fully refunded.

isOverduebooleanrequired

Is the pay plan overdue.

overdueAmountinteger(int64)

If set, this is the amount that was expected to be paid on the last scheduled instalment but was not in minor currency units.

overdueAtstring(date-time)

If set, when the pay plan became overdue.

bankTransferDetailsobject(BankTransferDetails)

Details necessary to pay this pay plan via bank transfer. Only present if payment method is enabled for this merchant

createdAtstring(date-time)required

When the pay plan was created.

updatedAtstring(date-time)required

When the pay plan was last updated.

Response
application/json
{ "payPlanId": "plan_aZ-9UfKvllCPqGsb", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "customerId": "cust_aZ-9UfKvllCPqGsa", "state": "Created", "amount": { "minorCurrencyUnits": 0, "currency": "AUD" }, "surchargeAmount": 0, "platformFee": 0, "taxAmount": 0, "payPlanVariant": "payplan_fortnight_25_25_25_25", "nextInstalmentDate": "2019-08-24T14:15:22Z", "nextInstalment": 3, "planAmountOutstanding": 0, "paymentSourceType": "Card", "merchantOrderId": "ordr_aZ-9UfKvllCPqGsd", "transactionId": "tran_aZ-9UfKvllCPqGsc", "charges": [ {} ], "refunds": [ {} ], "isRefunded": true, "isOverdue": true, "overdueAmount": 0, "overdueAt": "2019-08-24T14:15:22Z", "bankTransferDetails": { "reference": "string", "bankAccountNumber": "string", "bankAccountBsb": "string", "payId": "string", "metadata": {} }, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }

Calculate Pay Plan Max Loan

Request

Return the maximum loan amount the given customer is currently eligible for.

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

Currency to request max loan amount for

payPlanVariantstring(PayPlanVariant)

The pay plan variant to be used - defaults to the first configured value for the merchant or payplan_fortnight_25_25_25_25

Enum"payplan_fortnight_25_25_25_25""payplan_4_weekly_payments""payplan_8_weekly_payments""payplan_26_fortnightly_payments""payplan_52_weekly_payments""payplan_2_monthly_payments""payplan_3_monthly_payments""payplan_4_monthly_payments""payplan_5_monthly_payments""payplan_6_monthly_payments"
curl -i -X POST \
  https://api.sandbox.au.meetapril.io/payplans/max \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Customer-Id: string' \
  -d '{
    "currency": "AUD",
    "payPlanVariant": "payplan_fortnight_25_25_25_25"
  }'

Responses

Bodyapplication/json
amountobject(CurrencyAmount)required

The maximum loan amount based on the customer's loan eligibility analysis

amount.​minorCurrencyUnitsinteger(int64)required

The amount in minor currency units (e.g. cents for AUD).

amount.​currencystringrequired

The currency of the given amount as a 3 letter ISO code.

summarystringrequired

Gives further information about the customer's loan eligibility analysis

Response
application/json
{ "amount": { "minorCurrencyUnits": 0, "currency": "AUD" }, "summary": "string" }

Calculate Pay Plan Parameters

Request

Calculate the pay plan parameters for the given amount and list of variants.

Beta release - This endpoint is close to being finalised but non-backward compatible changes to parameters and behaviour may still occur.

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

Bodyapplication/jsonrequired
amountobject(CurrencyAmount)required

The full order amount

amount.​minorCurrencyUnitsinteger(int64)required

The amount in minor currency units (e.g. cents for AUD).

amount.​currencystringrequired

The currency of the given amount as a 3 letter ISO code.

payPlanVariantsArray of strings(PayPlanVariant)

The variants of the plan to calculate parameters for.

Items Enum"payplan_fortnight_25_25_25_25""payplan_4_weekly_payments""payplan_8_weekly_payments""payplan_26_fortnightly_payments""payplan_52_weekly_payments""payplan_2_monthly_payments""payplan_3_monthly_payments""payplan_4_monthly_payments""payplan_5_monthly_payments""payplan_6_monthly_payments"
payInFullAmountinteger(int64)

The portion of the order amount that is for pay in full items in minor currency units. Only relevant for merchants who have a pre-arranged agreement with April to support orders including some pay in full items.

curl -i -X POST \
  https://api.sandbox.au.meetapril.io/payplans/parameters \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Merchant-Id: string' \
  -d '{
    "amount": {
      "minorCurrencyUnits": 0,
      "currency": "AUD"
    },
    "payPlanVariants": [
      "payplan_fortnight_25_25_25_25"
    ],
    "payInFullAmount": 0
  }'

Responses

Bodyapplication/json
parametersArray of objects(PayPlanParameters)

Pay plan parameters for each of the requested variants.

Response
application/json
{ "parameters": [ {} ] }

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