Create a payment
Use this endpoint to create a payment.
Include the action property to send an action immediately after the payment resource is created.
On a successful creation, the Bango Platform can automatically create an alias that merchants can use to retrieve payments and perform updates. For example, if the merchant sets partnerPaymentId to aoieroiu234oiu in the create request, it can later use partnerPaymentId:aoieroiu234oiu in GET and POST requests in place of the rid path parameter. The prefix partnerPaymentId is mandatory in this case.
400 response error codes:
invalid-jsonif the request body isn’t valid JSON formatmissing-parameterfor any mandatory parameter missing from the request bodyinvalid-parameterfor any parameter that’s syntactically or semantically incorrect. For example:- If this specification defines a parameter as a string, and an array of strings is supplied
- If this specification defines a parameter as a datetime, and an invalid datetime is supplied
- If parameters should be in a particular order (eg chronological datetimes) and they aren’t
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Headers
A unique identifier to use for idempotency purposes.
"76aa2331-a96a-4a3b-8c23-019aabb44ed1"
Path Parameters
Globally unique namespace ID. These IDs are opaque, not guessable, and not sequential.
Bango provides each Bango partner with a unique set of resource URIs. All resource URI paths start with /ns/{nsid}, where {nsid} is the namespace ID. No other Bango partner shares this namespace. Partner credentials permit access only to URIs with this namespace.
"673c74de-ce5b-4f79-9851-2544d1d836cb"
Body
Data needed to create a payment.
A unique identifier for a payment method used to charge a payment provider's end user.
To obtain a payment instrument token, use the Bango Identity Verification API.
To charge an end user using a payment instrument token, use the Bango Payments API.
"65ea5204-f1c1-463d-9eab-da7977960e2d"
An item (product or service) purchased in whole or part by a payment.
The merchant partner's own unique identifier for the payment. Not necessarily a UUID. The Bango Platform considers this an opaque value but checks for uniqueness when the payment is being created (400 error if not).
1 - 255"asdfg-asdfhj-fgrewa-bcczx"
Merchant-owned request identifier. Bango considers this identifier opaque, and passes it to the payment provider unchanged (in OPPA request actions, as merchantPaymentId).
In a returned payment resource, the partnerRequestId reflects the value specified in the request from the merchant. If a request does not specify a partnerRequestId then the response does not include a partnerRequestId.
1 - 255"zfknveriuouzxcqweff12tgdvxxzb0"
Optional action to send immediately after a successful resource creation.
- AUTHORIZE API action
- CHARGE API action [plan-later]
Data shared between the merchant partner and the payment provider as part of a payment resource. Supplied to the payment provider with every payment action, such as AUTHORIZE or CHARGE.
Response
Resource created.
A payment resource.
Globally unique resource ID. These IDs are opaque, not guessable, and not sequential.
Each individual resource in a partner's namespace has a unique identifier: this is the identifier immediately after the resource type in the URI path.
For example, in the URI /ns/673c74de-ce5b-4f79-9851-2544d1d836cb/elephants/581b2e40-741c-4683-ae66-46c9fe6f4d5e:
- The namespace id is
673c74de-ce5b-4f79-9851-2544d1d836cbde elephantsindicates the resource type iselephant- The resource id is
581b2e40-741c-4683-ae66-46c9fe6f4d5e
Every resource has a read-only property rid that contains the resource ID, for convenience.
"581b2e40-741c-4683-ae66-46c9fe6f4d5e"
A unique identifier for a payment method used to charge a payment provider's end user.
To obtain a payment instrument token, use the Bango Identity Verification API.
To charge an end user using a payment instrument token, use the Bango Payments API.
"65ea5204-f1c1-463d-9eab-da7977960e2d"
An item (product or service) purchased in whole or part by a payment.
RFC 3339 datetime of the last update to this resource
"2022-12-21T08:59:32Z"
The total amounts currently authorized, captured, refunded, and canceled for the payment, taking all successful actions into account. Values exclude any requests awaiting a response from the downstream payment provider.
For one-step payments (the CHARGE action), the authorized and captured values are always identical.
The high-level view of the progress of the payment through the standard lifecycle. Allowed values are:
creating- the partner requested a new payment resource but the request has not yet been approvednew- the payments system approved a request to create a payment resource and there are no approved authorization/capture/charge/refund events. Balances:authorized == 0, captured == 0, refunded == 0authorized- the payments system approved a request to create a payment resource and there's at least one approved authorization event, but no captures, charges, or refunds. Balances:authorized > 0, captured == 0, refunded == 0captured- the payments system approved a request to create a payment resource and there's at least one approved authorization/capture/charge event, and maybe some refunds, and the payment isn't fully refunded. Balances:authorized > 0, captured > 0, refunded >= 0, captured > refundedrefunded- the payments system approved a request to create a payment resource and the payment is fully refunded. Balances:authorized > 0, captured > 0, refunded > 0, captured == refundedclosed- the payment resource is effectively frozen. No actions will be processed.
creating, new, authorized, captured, refunded, closed Indicates whether the Bango Platform is:
preparing: preparing to process a partner action, and NOT ready to receive a new actionprocessing: processing a partner action (including waiting for a response from the downstream payment provider), and NOT ready to receive a new actionidle: NOT currently processing a partner action, and ready to receive a new action
While processingState is preparing or processing, the Bango Platform will reject any new action for this payment resource.
idle, preparing, processing The result of the most recent action, if any.
An internal action that occurs automatically when the merchant partner creates the payment. A merchant can't send this action explicitly.
- CREATE pseudo-API action
- AUTHORIZE API action
- CANCEL_AUTH API action
- CAPTURE API action
- CHARGE API action [plan-later]
- REFUND API action
The merchant partner's own unique identifier for the payment. Not necessarily a UUID. The Bango Platform considers this an opaque value but checks for uniqueness when the payment is being created (400 error if not).
1 - 255"asdfg-asdfhj-fgrewa-bcczx"
Merchant-owned request identifier. Bango considers this identifier opaque, and passes it to the payment provider unchanged (in OPPA request actions, as merchantPaymentId).
In a returned payment resource, the partnerRequestId reflects the value specified in the request from the merchant. If a request does not specify a partnerRequestId then the response does not include a partnerRequestId.
1 - 255"zfknveriuouzxcqweff12tgdvxxzb0"
The payment provider's own unique identifier for the payment. Not necessarily a UUID. Bango assumes it is unique.
The payment provider may supply this value in response to a request from the Bango Platform. Subsequent requests to the payment provider include the value where relevant, and responses to the Bango Platform may replace the value.
The current value is given to the merchant in the payment resource.
1 - 255"345hkjhsgdkfgh43k5hjkhk1"
Data shared between the merchant partner and the payment provider as part of a payment resource. Supplied to the payment provider with every payment action, such as AUTHORIZE or CHARGE.

