v1
latestOpenAPI 3.0.02026-07-24126202516.7 KBCharges
Create Charge
Create a Charge. Charges require a specified Card Account or Bank Account. You may pass through an existing User, or define the user_id of the new user that will be associated with the Charge and the provided Account. The user_id can be left blank if you wish for a new user to be created for the Charge, or specified if you wish for a new User to be created with the passed user_id.
post/charges
Request body
Example request
{
"account_id": "5ef44050-4c56-0137-abdf-0242ac110002",
"name": "Test Charge 001",
"email": "buyer-1556505753@promisepay.com",
"country": "AUS",
"user_id": "buyer-1556505753",
"currency": "AUD"
}Response
OK
Example response
{
"charges": {
"id": "cb7eafc1-571c-425c-9adc-f56cb585cd68",
"name": "Charge for Delivery",
"state": "completed",
"seller_fees": 400,
"status": 22500,
"amount": 20000,
"dynamic_descriptor": "ASM*Samuel Seller",
"account_id": "b49d943f-add0-4d1c-b357-0f1a8fde677c",
"account_type": "credit card",
"promisepay_fee": 187,
"currency": "AUD",
"payment_method": "charge",
"buyer_name": "Anonymous Buyer",
"buyer_email": "anonymous+buyer+1@assemblypayments.com",
"buyer_country": "AUS",
"seller_name": "Anonymous Seller",
"seller_email": "anonymous+seller+1@assemblypayments.com",
"seller_country": "AUS",
"related": {
"buyers": "064d6800-fff3-11e5-86aa-5e5517507c66",
"sellers": "5830def0-ffe8-11e5-86aa-5e5517507c66"
},
"links": {
"self": "/charges?limit=2&offset",
"buyers": "/charges/cb7eafc1-571c-425c-9adc-f56cb585cd68/buyers",
"sellers": "/charges/cb7eafc1-571c-425c-9adc-f56cb585cd68/sellers",
"status": "/charges/cb7eafc1-571c-425c-9adc-f56cb585cd68/status"
}
}
}