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.
Request
- Base URLhttps://virtserver.swaggerhub.com/AssemblyPlatforms/assembly-async-api/1.0.0
- URLhttps://virtserver.swaggerhub.com/AssemblyPlatforms/assembly-async-api/1.0.0/items/{id}/make_payment
- Auth
- HTTP basic
- or OAuth 2Client credentialsToken URL: https://au-0000.sandbox.auth.assemblypay.com/tokens
Path parameters
ID of item to apply payment to
Request body
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.