Item Actions

Make Payment

This endpoint extends the original make_payment API endpoint to allow asynchronous processing. Clients may optionally supply a wait parameter to have the server wait up to 30 seconds for a response from internal business systems. If a response has been received in that time, it is returned immediately. Otherwise status information and links are returned. Calling the status link returns the item response if available, status information otherwise. Clients may also optionally supply a callback URL in URL-encoded format. The path parameters {item}, {account} and {uuid} are supported. If a callback is present, the system POSTs the internal business system response to it.

patch/items/{id}/make_payment

Request

  • Base URL
    https://virtserver.swaggerhub.com/AssemblyPlatforms/assembly-async-api/1.0.0
  • URL
    https://virtserver.swaggerhub.com/AssemblyPlatforms/assembly-async-api/1.0.0/items/{id}/make_payment
  • Auth
    • HTTP basic
    • or OAuth 2
      Client credentials
      Token URL: https://au-0000.sandbox.auth.assemblypay.com/tokens

Path parameters

idstring required

ID of item to apply payment to

Request body

account_idstring required

Account id of the bank account/credit card, etc making payment (not user id)

device_idstring

Device Information for the device initiating the payment. This must be provided for card payments.

ip_addressstring

IP Information for the device initiating the payment. This must be provided for card payments.

waitinteger

Time in seconds to wait for item response (up to 30). If this value is not provided, it will defaul to 0 and the call will go asynchronously.

callbackstring

Address to callback when an internal business system response is received. Path parameters {account} {item} and {uuid} may be used. The value must be URL-encoded. The example value shown here represents the URL https://callback.example.com/assembly/{item}/{account}/{uuid}

Example request

{
  "account_id": "725cc8c0-759b-0138-5d6d-0a58a9feac05",
  "device_id": "358277090995038",
  "ip_address": "49.192.154.141",
  "callback": "https%3A%2F%2Fcallback.example.com%2Fassembly%2F%7Bitem%7D%2F%7Baccount%7D%2F%7Buuid%7D"
}

Response

Response body contains the item response received within the supplied wait time. Note that the HTTP response code will reflect the internal system response.

Example response

{
  "items": {
    "id": "100fd4a0-0538-11e6-b512-3e1d05defe78",
    "name": "Landscaping Job #001",
    "description": "Planting of natives, removal of tree stump.",
    "state": "pending",
    "status": 22000,
    "amount": 20000,
    "payment_type_id": 2,
    "currency": "AUD",
    "buyer_name": "Bella Buyer",
    "buyer_email": "bella.buyer@assemblypayments.com",
    "buyer_country": "AUS",
    "seller_name": "Samuel Seller",
    "seller_email": "samuel.seller@assemblypayments.com",
    "seller_country": "AUS",
    "tds_check_state": "NA",
    "net_amount": 20000,
    "seller_fees": 400,
    "promisepay_fee": 350,
    "total_outstanding": 20000,
    "total_amount": 20000,
    "payment_method": "pending",
    "payment_credit_card_enabled": true,
    "payment_direct_debit_enabled": true,
    "related": {
      "buyers": "064d6800-fff3-11e5-86aa-5e5517507c66",
      "sellers": "5830def0-ffe8-11e5-86aa-5e5517507c66"
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.