Create Payment Charge
Create a new payment charge for your customer to pay.
Create a new payment charge for your customer to pay.
API KeyAuthorizationBearer <token>Your API key for the API. You can find it in your integration settings. Starts with sk_
On-Behalf-Of?stringOnly for platforms with connected accounts. The ID of a connected account to create this charge as; the charge then belongs to that account. It must be actively connected to the account that owns the API key. Leave it out to create the charge for your own account.
uuidIdempotency-Key?stringUnique key to safely retry this request. Repeating a key returns the original response instead of performing the operation again.
application/json- body
payment_method*stringThe code of a payment method enabled for the account. Get the available codes from the code field of List Payment Methods.
customer_details*currency*string"idr"amount*numberdouble0payment_method_options?null|expires_at?|date-timeclient_reference_id?null|stringdescription?null|stringapplication_fee_amount?|Only for platforms, together with the On-Behalf-Of header. The part of amount your platform account keeps as its fee once the charge succeeds. Must be greater than 0, and together with the processing fee must not exceed amount.
doubleitems?null|array<>OK
application/json- response
data*status?stringcurl -X POST 'https://api.kingsplatform.net/api/v1/payments/charges' \ -H 'Content-Type: application/json' \ -d '{ "payment_method": "string", "customer_details": { "email": "string" }, "currency": "idr", "amount": 0}'{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "client_reference_id": null, "payment_method": null, "account": null, "platform_account": null, "payment_method_options": null, "description": null, "currency": "string", "status": "string", "amount": 0.1, "fee": 0.1, "application_fee_amount": null, "net_amount": 0.1, "customer_details": null, "items": null, "payment_action": null, "paid_at": null, "settles_at": null, "expires_at": null, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }, "status": "string"}