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

Query Orders

Request

Return a paginated list of matching orders

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.

orderIdArray of strings

Filter by merchant order id

merchantIdArray of strings

Filter by merchant identifier

orderTypeArray of strings(OrderType)

Filter by order type

Items Enum"online""manual""invoice"
referenceOrderIdArray of strings

Filter by reference order id

orderStatusArray of strings(OrderStatus)

Filter by order status

Items Enum"created""accepted""paid""cancelled""fulfilled""returned"
curl -i -X GET \
  'https://api.sandbox.au.meetapril.io/orders?limit=0&page=0&sort=string&orderId=string&merchantId=string&orderType=online&referenceOrderId=string&orderStatus=created' \
  -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 [
orderIdstringrequired

System unique identifier for the order.

merchantIdstringrequired

System unique identifier for the merchant the order was created for.

referenceOrderIdstringrequired

A reference provided by the merchant to identify this order, such as an order number.

amountobject(IsoCurrencyAmount)required

The un-surcharged order amount that goes on the invoice.

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.

surchargeobject(Surcharge)

Surcharge details, if applicable for this order.

customerEmailAddressstring

Optional email address of the customer.

customerPhoneNumberstring

Optional phone number of the customer.

customerNamestring

Optional name of the customer.

orderTypestring(OrderType)required
Enum"online""paybylink""invoice"
orderTypeDetailsInvoiceOrderTypeDetails (object) or OnlineOrderTypeDetails (object) or PayByLinkOrderTypeDetails (object)(OrderTypeDetails)required
One of:
orderTypeDetails.​InvoiceOrderTypeDetailsobject(InvoiceOrderTypeDetails1)required
orderTypeDetails.​InvoiceOrderTypeDetails.​invoiceLineItemsArray of objects(InvoiceLineItem)
orderTypeDetails.​InvoiceOrderTypeDetails.​customerConfigobject(OrderCustomerConfig)
descriptionstring

A free text description of the order.

itemsArray of objects(Item)

A list of line items included in the order.

discountAmountinteger(int64)

Discount applied to order in minor currency units.

shippingobject(Shipping)

Shipping address for the order.

billingobject(Billing)

Billing address for the order.

metadataobject(JsonObject)

Merchant specific additional data associated with this order.

statusstring(OrderStatus)required
Enum"created""accepted""paid""cancelled""fulfilled""returned"
settlementConfigurationstring(SettlementConfiguration)required
Enum"default""standard""realtime_preferred""realtime_required"
createdAtstring(date-time)required

When the order was created.

updatedAtstring(date-time)required

When the order was last updated.

]
Response
application/json
[ { "orderId": "ordr_aZ-9UfKvllCPqGsd", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "referenceOrderId": "ORD-12411", "amount": {}, "surcharge": {}, "customerEmailAddress": "string", "customerPhoneNumber": "string", "customerName": "string", "orderType": "online", "orderTypeDetails": {}, "description": "string", "items": [], "discountAmount": 0, "shipping": {}, "billing": {}, "metadata": {}, "status": "created", "settlementConfiguration": "default", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ]

Create Order

Request

Creates a new order

Security
Marketplace API Key | Merchant Secret Token | Marketplace JWT | Merchant 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
One of:
CreateOnlineOrderobject(CreateOnlineOrder1)required

Represents an order processed in real-time, typically on an e-commerce site.

CreateOnlineOrder.​referenceOrderIdstringrequired

A reference provided by the merchant to identify this order, such as an order number.

CreateOnlineOrder.​amountobject(CurrencyAmount)required

The order amount in minor currency units prior to any applicable surcharges

CreateOnlineOrder.​amount.​minorCurrencyUnitsinteger(int64)required

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

CreateOnlineOrder.​amount.​currencystringrequired

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

CreateOnlineOrder.​customerEmailAddressstring

Optional email address of the customer

CreateOnlineOrder.​customerPhoneNumberstring

Optional phone number of the customer.

CreateOnlineOrder.​descriptionstring

A free text description of the order

CreateOnlineOrder.​itemsArray of objects(Item)

A list of line items included in the order

CreateOnlineOrder.​discountAmountinteger(int64)

Optional discount applied to order in minor currency units.

CreateOnlineOrder.​shippingobject(Shipping)

Optional shipping address for the order.

CreateOnlineOrder.​billingobject(Billing)

Billing address for the order.

CreateOnlineOrder.​metadataobject(JsonObject)

Merchant specific additional data associated with this order.

CreateOnlineOrder.​parentTransactionIdParentAcquiringTransactionId (object) or ParentIssuingTransactionId (object)(ParentTransactionId)
One of:

Is this transaction derived from or linked to another Transaction.

CreateOnlineOrder.​settlementConfigurationstring(SettlementConfiguration)

For merchants with multiple settlement configurations, this field can be used to specify the desired settlement configuration for this order.

Enum"default""standard""realtime_preferred""realtime_required"
curl -i -X POST \
  https://api.sandbox.au.meetapril.io/orders \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Customer-Id: string' \
  -H 'Merchant-Id: string' \
  -d '{
    "CreateOnlineOrder": {
      "referenceOrderId": "ORD-12411",
      "amount": {
        "minorCurrencyUnits": 0,
        "currency": "AUD"
      },
      "customerEmailAddress": "lucy.diamond@star.com",
      "customerPhoneNumber": "string",
      "description": "string",
      "items": [
        {
          "amount": {
            "minorCurrencyUnits": 0,
            "currency": "string"
          },
          "description": "string",
          "sku": "string",
          "quantity": 0,
          "imageUrl": "string"
        }
      ],
      "discountAmount": 0,
      "shipping": {
        "amount": 0,
        "address": {
          "line1": "string",
          "line2": "string",
          "city": "string",
          "state": "string",
          "postalCode": "string",
          "country": "string"
        },
        "carrier": "string",
        "name": "string",
        "phoneNumber": "string",
        "trackingNumber": "string"
      },
      "billing": {
        "address": {
          "line1": "string",
          "line2": "string",
          "city": "string",
          "state": "string",
          "postalCode": "string",
          "country": "string"
        },
        "name": "string",
        "phoneNumber": "string"
      },
      "metadata": {},
      "parentTransactionId": {
        "transactionId": "tran_aZ-9UfKvllCPqGsc"
      },
      "settlementConfiguration": "default"
    }
  }'

Responses

Bodyapplication/json
One of:
OnlineOrderobject(OnlineOrder1)required
OnlineOrder.​orderobject(OrderResponse)required

Details of the generated order

OnlineOrder.​order.​orderIdstringrequired

System unique identifier for the order.

OnlineOrder.​order.​merchantIdstringrequired

System unique identifier for the merchant the order was created for.

OnlineOrder.​order.​referenceOrderIdstringrequired

A reference provided by the merchant to identify this order, such as an order number.

OnlineOrder.​order.​amountobject(IsoCurrencyAmount)required

The un-surcharged order amount that goes on the invoice.

OnlineOrder.​order.​amount.​minorCurrencyUnitsinteger(int64)required

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

OnlineOrder.​order.​amount.​currencystringrequired

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

OnlineOrder.​order.​surchargeobject(Surcharge)

Surcharge details, if applicable for this order.

OnlineOrder.​order.​customerEmailAddressstring

Optional email address of the customer.

OnlineOrder.​order.​customerPhoneNumberstring

Optional phone number of the customer.

OnlineOrder.​order.​customerNamestring

Optional name of the customer.

OnlineOrder.​order.​orderTypestring(OrderType)required
Enum"online""paybylink""invoice"
OnlineOrder.​order.​orderTypeDetailsInvoiceOrderTypeDetails (object) or OnlineOrderTypeDetails (object) or PayByLinkOrderTypeDetails (object)(OrderTypeDetails)required
One of:
OnlineOrder.​order.​orderTypeDetails.​InvoiceOrderTypeDetailsobject(InvoiceOrderTypeDetails1)required
OnlineOrder.​order.​orderTypeDetails.​InvoiceOrderTypeDetails.​invoiceLineItemsArray of objects(InvoiceLineItem)
OnlineOrder.​order.​orderTypeDetails.​InvoiceOrderTypeDetails.​customerConfigobject(OrderCustomerConfig)
OnlineOrder.​order.​descriptionstring

A free text description of the order.

OnlineOrder.​order.​itemsArray of objects(Item)

A list of line items included in the order.

OnlineOrder.​order.​discountAmountinteger(int64)

Discount applied to order in minor currency units.

OnlineOrder.​order.​shippingobject(Shipping)

Shipping address for the order.

OnlineOrder.​order.​billingobject(Billing)

Billing address for the order.

OnlineOrder.​order.​metadataobject(JsonObject)

Merchant specific additional data associated with this order.

OnlineOrder.​order.​statusstring(OrderStatus)required
Enum"created""accepted""paid""cancelled""fulfilled""returned"
OnlineOrder.​order.​settlementConfigurationstring(SettlementConfiguration)required
Enum"default""standard""realtime_preferred""realtime_required"
OnlineOrder.​order.​createdAtstring(date-time)required

When the order was created.

OnlineOrder.​order.​updatedAtstring(date-time)required

When the order was last updated.

Response
application/json
{ "OnlineOrder": { "order": {} } }

Pay Order

Request

Pay for an order using a payment token. Make sure you read the Error Handling page as you will need to add some logic to handle a 3DS challenge for card based payments.

3DS may be required for several reasons including

  • Explicitly requesting it in the request
  • An eligibility requirement to establish a pay plan
  • Required by the card issuer
Security
Marketplace API Key | Merchant Secret Token | Pay By Link Token
Path
orderIdstringrequired
Bodyapplication/jsonrequired
One of:
Confirm3DSCompleteobject(Confirm3DSComplete1)required

When 3DS is required, a card based PayOrder call returns status code 200 with response type ThreeDSAuthorisationRequired containing the details needed to complete the 3DS challenge. Use this action to complete the pay order process after the 3DS challenge is complete. See 3D-Secure Utilisation for further details.

Confirm3DSComplete.​referenceTransactionIdstring

Optional reference that can be passed in when Creating a transaction.

Confirm3DSComplete.​paymentTokenIdstringrequired

Payment token representing the payment used to pay for this order

Confirm3DSComplete.​threeDSResponseobject(ThreeDSResult)required

The ThreeDSAuthorisationRequired value returned in the body of the response from the original PayOrder call that required 3DS.

Confirm3DSComplete.​threeDSResponse.​threeDSAuthorisationIdstringrequired

Uniquely represents this 3DS challenge. The customer has now completed the challenge, so this value must be returned in a PayOrder call using the Confirm3DSComplete action.

Confirm3DSComplete.​authoriseOnlyboolean

Authorise payment only. Should be the same value as passed into the original PayOrder call.

curl -i -X POST \
  'https://api.sandbox.au.meetapril.io/orders/{orderId}/pay' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "Confirm3DSComplete": {
      "referenceTransactionId": "string",
      "paymentTokenId": "ptkn_aZ-9VPKvllCPqGs0",
      "threeDSResponse": {
        "threeDSAuthorisationId": "string"
      },
      "authoriseOnly": true
    }
  }'

Responses

Bodyapplication/json
One of:
PayOrderCompleteobject(PayOrderComplete1)required
PayOrderComplete.​transactionIdstringrequired

System unique identifier for the transaction.

PayOrderComplete.​transactionStatusstring(TransactionStatus)required

These are the statuses returned by the order payment API and the values displayed when merchant integrators retrieve (GET) a transaction via the API.

Note: our dashboards in most cases map these statuses to different values, but only for display purposes.

  • accepted - This payment was accepted by the customer but the payment method is asynchronous (e.g.: Direct Debit, Bank Transfer), so we have to wait for the final result before we move it to either paid or failed.
  • paid - This payment is successful and funds have been collected.
  • pending - This payment is successful, funds have been collected from the customer, but they are pending being transferred to the merchants balance. This status is currently only used by PayPlan's since we delay the transfer of funds into a merchants balance.
  • refunded - A full refund has been initiated on this payment.
  • partially_refunded - A partial refund of the original payment amount has been initiated on this payment.
  • failed - The attempt to collect funds from the payment method was not successful.
  • cancelled - This payment has been cancelled.
  • disputed - At least one charge on the payment method has been disputed.
  • not_captured - The payment method has been authorised but funds are not yet captured.
  • incomplete - This payment has not been completed by the customer. Currently, a transaction is only incomplete if 3DS authentication has not yet been completed. If the customer does not complete the authentication, the transaction will stay in this state.
Enum"accepted""paid""refunded""partially_refunded""pending""failed""cancelled""disputed""not_captured""incomplete"
PayOrderComplete.​transactionDetailsobject(TransactionResponse)required
PayOrderComplete.​transactionDetails.​purchaseDetailsobject(PurchaseDetails)required
PayOrderComplete.​transactionDetails.​purchaseDetails.​orderIdstringrequired

System unique identifier for the order.

PayOrderComplete.​transactionDetails.​purchaseDetails.​merchantIdstringrequired

System unique identifier for the merchant the order was created for.

PayOrderComplete.​transactionDetails.​purchaseDetails.​referenceOrderIdstringrequired

A reference provided by the merchant to identify this order, such as an order number.

PayOrderComplete.​transactionDetails.​purchaseDetails.​amountobject(CurrencyAmount)required

The order amount including any surcharge passed on to the customer.

PayOrderComplete.​transactionDetails.​purchaseDetails.​amount.​minorCurrencyUnitsinteger(int64)required

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

PayOrderComplete.​transactionDetails.​purchaseDetails.​amount.​currencystringrequired

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

PayOrderComplete.​transactionDetails.​purchaseDetails.​surchargeAmountinteger(int64)required

The amount in minor currency units that was surcharged to the customer.

PayOrderComplete.​transactionDetails.​purchaseDetails.​refundedAmountinteger(int64)required

The amount in minor currency units that has been refunded to the customer.

PayOrderComplete.​transactionDetails.​purchaseDetails.​merchantNamestringrequired

Business name of the merchant the order is associated with.

PayOrderComplete.​transactionDetails.​purchaseDetails.​transactionIdstringrequired

System unique identifier for the transaction representing this payment.

PayOrderComplete.​transactionDetails.​purchaseDetails.​referenceTransactionIdstring

A reference provided by the merchant to identify this transaction.

PayOrderComplete.​transactionDetails.​purchaseDetails.​orderTypestring(OrderType)required
Enum"online""paybylink""invoice"
PayOrderComplete.​transactionDetails.​purchaseDetails.​payTypestring(PayType1)required
Enum"PayPlan""PayInFull"
PayOrderComplete.​transactionDetails.​purchaseDetails.​descriptionstring

A free text description of the order.

PayOrderComplete.​transactionDetails.​purchaseDetails.​orderMetadataobject(JsonObject)

Metadata passed in when creating the order.

PayOrderComplete.​transactionDetails.​purchaseDetails.​statusstring(TransactionStatus)required

These are the statuses returned by the order payment API and the values displayed when merchant integrators retrieve (GET) a transaction via the API.

Note: our dashboards in most cases map these statuses to different values, but only for display purposes.

  • accepted - This payment was accepted by the customer but the payment method is asynchronous (e.g.: Direct Debit, Bank Transfer), so we have to wait for the final result before we move it to either paid or failed.
  • paid - This payment is successful and funds have been collected.
  • pending - This payment is successful, funds have been collected from the customer, but they are pending being transferred to the merchants balance. This status is currently only used by PayPlan's since we delay the transfer of funds into a merchants balance.
  • refunded - A full refund has been initiated on this payment.
  • partially_refunded - A partial refund of the original payment amount has been initiated on this payment.
  • failed - The attempt to collect funds from the payment method was not successful.
  • cancelled - This payment has been cancelled.
  • disputed - At least one charge on the payment method has been disputed.
  • not_captured - The payment method has been authorised but funds are not yet captured.
  • incomplete - This payment has not been completed by the customer. Currently, a transaction is only incomplete if 3DS authentication has not yet been completed. If the customer does not complete the authentication, the transaction will stay in this state.
Enum"accepted""paid""refunded""partially_refunded""pending""failed""cancelled""disputed""not_captured""incomplete"
PayOrderComplete.​transactionDetails.​purchaseDetails.​refundIdsArray of strings

A list of refund system unique identifiers issued against this transaction.

PayOrderComplete.​transactionDetails.​purchaseDetails.​disputeIdsArray of strings

System unique identifiers for any disputes raised against this transaction.

PayOrderComplete.​transactionDetails.​purchaseDetails.​paidOnstring(date)

The day the payment was settled with the merchant. Only set after a successful payout.

PayOrderComplete.​transactionDetails.​purchaseDetails.​availableOnstring(date)

The day this payment will be available for payout to the merchant.

PayOrderComplete.​transactionDetails.​purchaseDetails.​parentTransactionIdParentAcquiringTransactionId (object) or ParentIssuingTransactionId (object)(ParentTransactionId)
One of:

If linked to a another transaction, this can be set here.

PayOrderComplete.​transactionDetails.​purchaseDetails.​referenceIssuerTransactionIdstring

If this transaction runs as a closed loop transaction, this will provide the corresponding IssuerTransactionId

PayOrderComplete.​transactionDetails.​purchaseDetails.​createdAtstring(date-time)required
PayOrderComplete.​transactionDetails.​purchaseDetails.​updatedAtstring(date-time)required
PayOrderComplete.​transactionDetails.​purchaseDetails.​disputeIdstringDeprecated

System unique identifier for a dispute raised against this transaction, if any.

PayOrderComplete.​transactionDetails.​paymentMethodCardPaymentMethod (object) or DirectDebitPaymentMethod (object) or PayToPaymentMethod (object)(TransactionPaymentMethod)
One of:
PayOrderComplete.​transactionDetails.​serviceFeesobject(ServiceFees)

Restricted field - only included if caller has access.

PayOrderComplete.​transactionDetails.​customerDetailsobject(CustomerDetails)
PayOrderComplete.​transactionDetails.​timelinesArray of objects(TransactionTimeLine)
PayOrderComplete.​amountinteger(int64)required

The order amount in minor currency units - note this includes any surcharging amount applied to the transaction

PayOrderComplete.​currencystringrequired

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

PayOrderComplete.​surchargeAmountinteger(int64)required

The order amount surcharge component in minor currency units

PayOrderComplete.​payTypestring(PayTypeDto)required

The payment type used to pay for this order.

Enum"payplan""payinfull"
Response
application/json
{ "PayOrderComplete": { "transactionId": "tran_aZ-9UfKvllCPqGsc", "transactionStatus": "accepted", "transactionDetails": {}, "amount": 0, "currency": "AUD", "surchargeAmount": 0, "payType": "payplan" } }

Get Order

Request

Retrieves an order

Security
Marketplace API Key | Merchant Secret Token | Pay By Link Token | Admin JWT | Marketplace JWT | Merchant JWT
Path
orderIdstringrequired
curl -i -X GET \
  'https://api.sandbox.au.meetapril.io/orders/{orderId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Bodyapplication/json
orderIdstringrequired

System unique identifier for the order.

merchantIdstringrequired

System unique identifier for the merchant the order was created for.

referenceOrderIdstringrequired

A reference provided by the merchant to identify this order, such as an order number.

amountobject(IsoCurrencyAmount)required

The un-surcharged order amount that goes on the invoice.

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.

surchargeobject(Surcharge)

Surcharge details, if applicable for this order.

customerEmailAddressstring

Optional email address of the customer.

customerPhoneNumberstring

Optional phone number of the customer.

customerNamestring

Optional name of the customer.

orderTypestring(OrderType)required
Enum"online""paybylink""invoice"
orderTypeDetailsInvoiceOrderTypeDetails (object) or OnlineOrderTypeDetails (object) or PayByLinkOrderTypeDetails (object)(OrderTypeDetails)required
One of:
orderTypeDetails.​InvoiceOrderTypeDetailsobject(InvoiceOrderTypeDetails1)required
orderTypeDetails.​InvoiceOrderTypeDetails.​invoiceLineItemsArray of objects(InvoiceLineItem)
orderTypeDetails.​InvoiceOrderTypeDetails.​customerConfigobject(OrderCustomerConfig)
descriptionstring

A free text description of the order.

itemsArray of objects(Item)

A list of line items included in the order.

discountAmountinteger(int64)

Discount applied to order in minor currency units.

shippingobject(Shipping)

Shipping address for the order.

billingobject(Billing)

Billing address for the order.

metadataobject(JsonObject)

Merchant specific additional data associated with this order.

statusstring(OrderStatus)required
Enum"created""accepted""paid""cancelled""fulfilled""returned"
settlementConfigurationstring(SettlementConfiguration)required
Enum"default""standard""realtime_preferred""realtime_required"
createdAtstring(date-time)required

When the order was created.

updatedAtstring(date-time)required

When the order was last updated.

Response
application/json
{ "orderId": "ordr_aZ-9UfKvllCPqGsd", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "referenceOrderId": "ORD-12411", "amount": { "minorCurrencyUnits": 0, "currency": "string" }, "surcharge": { "surchargeOptions": {}, "surchargePaidAmount": 0 }, "customerEmailAddress": "string", "customerPhoneNumber": "string", "customerName": "string", "orderType": "online", "orderTypeDetails": { "InvoiceOrderTypeDetails": {} }, "description": "string", "items": [ {} ], "discountAmount": 0, "shipping": { "amount": 0, "address": {}, "carrier": "string", "name": "string", "phoneNumber": "string", "trackingNumber": "string" }, "billing": { "address": {}, "name": "string", "phoneNumber": "string" }, "metadata": {}, "status": "created", "settlementConfiguration": "default", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }

Cancel Order

Request

Cancels an order, invalidating it from being payable.

Security
Marketplace API Key | Merchant Secret Token | Merchant JWT
Path
orderIdstringrequired
curl -i -X DELETE \
  'https://api.sandbox.au.meetapril.io/orders/{orderId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Bodyapplication/json
orderIdstringrequired

System unique identifier for the order.

merchantIdstringrequired

System unique identifier for the merchant the order was created for.

referenceOrderIdstringrequired

A reference provided by the merchant to identify this order, such as an order number.

amountobject(IsoCurrencyAmount)required

The un-surcharged order amount that goes on the invoice.

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.

surchargeobject(Surcharge)

Surcharge details, if applicable for this order.

customerEmailAddressstring

Optional email address of the customer.

customerPhoneNumberstring

Optional phone number of the customer.

customerNamestring

Optional name of the customer.

orderTypestring(OrderType)required
Enum"online""paybylink""invoice"
orderTypeDetailsInvoiceOrderTypeDetails (object) or OnlineOrderTypeDetails (object) or PayByLinkOrderTypeDetails (object)(OrderTypeDetails)required
One of:
orderTypeDetails.​InvoiceOrderTypeDetailsobject(InvoiceOrderTypeDetails1)required
orderTypeDetails.​InvoiceOrderTypeDetails.​invoiceLineItemsArray of objects(InvoiceLineItem)
orderTypeDetails.​InvoiceOrderTypeDetails.​customerConfigobject(OrderCustomerConfig)
descriptionstring

A free text description of the order.

itemsArray of objects(Item)

A list of line items included in the order.

discountAmountinteger(int64)

Discount applied to order in minor currency units.

shippingobject(Shipping)

Shipping address for the order.

billingobject(Billing)

Billing address for the order.

metadataobject(JsonObject)

Merchant specific additional data associated with this order.

statusstring(OrderStatus)required
Enum"created""accepted""paid""cancelled""fulfilled""returned"
settlementConfigurationstring(SettlementConfiguration)required
Enum"default""standard""realtime_preferred""realtime_required"
createdAtstring(date-time)required

When the order was created.

updatedAtstring(date-time)required

When the order was last updated.

Response
application/json
{ "orderId": "ordr_aZ-9UfKvllCPqGsd", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "referenceOrderId": "ORD-12411", "amount": { "minorCurrencyUnits": 0, "currency": "string" }, "surcharge": { "surchargeOptions": {}, "surchargePaidAmount": 0 }, "customerEmailAddress": "string", "customerPhoneNumber": "string", "customerName": "string", "orderType": "online", "orderTypeDetails": { "InvoiceOrderTypeDetails": {} }, "description": "string", "items": [ {} ], "discountAmount": 0, "shipping": { "amount": 0, "address": {}, "carrier": "string", "name": "string", "phoneNumber": "string", "trackingNumber": "string" }, "billing": { "address": {}, "name": "string", "phoneNumber": "string" }, "metadata": {}, "status": "created", "settlementConfiguration": "default", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }

Update Order

Request

Actions for modifying an existing order

Security
Marketplace API Key | Merchant Secret Token | Merchant JWT
Path
orderIdstringrequired
Bodyapplication/jsonrequired
One of:
UpdateReferenceOrderIdobject(UpdateReferenceOrderId1)required

Update the reference used by the merchant to identify this order.

UpdateReferenceOrderId.​referenceOrderIdstringrequired
curl -i -X PATCH \
  'https://api.sandbox.au.meetapril.io/orders/{orderId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "UpdateReferenceOrderId": {
      "referenceOrderId": "string"
    }
  }'

Responses

Bodyapplication/json
orderIdstringrequired

System unique identifier for the order.

merchantIdstringrequired

System unique identifier for the merchant the order was created for.

referenceOrderIdstringrequired

A reference provided by the merchant to identify this order, such as an order number.

amountobject(IsoCurrencyAmount)required

The un-surcharged order amount that goes on the invoice.

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.

surchargeobject(Surcharge)

Surcharge details, if applicable for this order.

customerEmailAddressstring

Optional email address of the customer.

customerPhoneNumberstring

Optional phone number of the customer.

customerNamestring

Optional name of the customer.

orderTypestring(OrderType)required
Enum"online""paybylink""invoice"
orderTypeDetailsInvoiceOrderTypeDetails (object) or OnlineOrderTypeDetails (object) or PayByLinkOrderTypeDetails (object)(OrderTypeDetails)required
One of:
orderTypeDetails.​InvoiceOrderTypeDetailsobject(InvoiceOrderTypeDetails1)required
orderTypeDetails.​InvoiceOrderTypeDetails.​invoiceLineItemsArray of objects(InvoiceLineItem)
orderTypeDetails.​InvoiceOrderTypeDetails.​customerConfigobject(OrderCustomerConfig)
descriptionstring

A free text description of the order.

itemsArray of objects(Item)

A list of line items included in the order.

discountAmountinteger(int64)

Discount applied to order in minor currency units.

shippingobject(Shipping)

Shipping address for the order.

billingobject(Billing)

Billing address for the order.

metadataobject(JsonObject)

Merchant specific additional data associated with this order.

statusstring(OrderStatus)required
Enum"created""accepted""paid""cancelled""fulfilled""returned"
settlementConfigurationstring(SettlementConfiguration)required
Enum"default""standard""realtime_preferred""realtime_required"
createdAtstring(date-time)required

When the order was created.

updatedAtstring(date-time)required

When the order was last updated.

Response
application/json
{ "orderId": "ordr_aZ-9UfKvllCPqGsd", "merchantId": "mcht_aZ-9UfKvllCPqGsZ", "referenceOrderId": "ORD-12411", "amount": { "minorCurrencyUnits": 0, "currency": "string" }, "surcharge": { "surchargeOptions": {}, "surchargePaidAmount": 0 }, "customerEmailAddress": "string", "customerPhoneNumber": "string", "customerName": "string", "orderType": "online", "orderTypeDetails": { "InvoiceOrderTypeDetails": {} }, "description": "string", "items": [ {} ], "discountAmount": 0, "shipping": { "amount": 0, "address": {}, "carrier": "string", "name": "string", "phoneNumber": "string", "trackingNumber": "string" }, "billing": { "address": {}, "name": "string", "phoneNumber": "string" }, "metadata": {}, "status": "created", "settlementConfiguration": "default", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }

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