Create a payment
Creates a payment for the given amount and method. Returns the payment with a pending status until the customer completes it.
POST
/paymentsAuthorization
AuthorizationBearer token · headerrequiredYour Apipay secret API key.
Request body
requiredapplication/jsonamountintegerrequiredcurrencystringrequireddefault: "IDR"
methodPaymentMethodrequiredAllowed:
qrisvirtual_accountcardewalletcustomer_idstringdescriptionstringResponses
201
The created payment.
idstringrequiredamountintegerrequiredAmount in the smallest unit of the currency (e.g. Rupiah has no sub-unit, so this is whole Rupiah).
currencystringrequiredmethodPaymentMethodrequiredAllowed:
qrisvirtual_accountcardewalletstatusPaymentStatusrequiredAllowed:
pendingsucceededfailedcanceledcustomer_idstring | nulldescriptionstring | nullcreated_atstring<date-time>required400
The request was malformed or missing a required field.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequired401
The API key is missing, invalid, or revoked.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequired