Submit Order Payment
POST/v2/:id/payment
Submits payment for a pending order to Bonsai for processing. Orders will be processed once payment is confirmed
Request
Path Parameters
id stringrequired
Public ID of the order.
Example: cldbvy7gt0006hpzo9nyw72ks
- application/json
Body
required
method stringrequired
Possible values: [credit card
, external payment
, stripe
]
Payment method used to pay for the order.
token stringrequired
Payment token for the order. Each payment token may be used for 1 order.
currency string
Possible values: [CAD
, USD
, GBP
, AUD
, EUR
]
ISO currency code for the currency that customer payment was taken in.
amounts object
Amounts for the order. Required only for external payment
method.
shipping floatrequired
Total amount of shipping costs, in target currency (ex. USD).;
taxes floatrequired
The amount of taxes to be paid, in target currency (ex. USD).
goods floatrequired
The amount of goods to be paid, in target currency (ex. USD).
Responses
- 400
- 401
- 404
- 5XX
400 - Bad request
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
errors object[]
status floatrequired
detail stringnullablerequired
title stringrequired
{
"errors": [
{
"status": 400,
"detail": "",
"title": "Bad input request"
}
]
}
401 - Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
errors object[]
status floatrequired
detail stringnullablerequired
title stringrequired
{
"errors": [
{
"status": 401,
"detail": "",
"title": "Authentication information is missing or invalid"
}
]
}
404 - Not found
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
errors object[]
status floatrequired
detail stringnullablerequired
title stringrequired
{
"errors": [
{
"status": 404,
"detail": "",
"title": "Not Found"
}
]
}
500 - Unknown error
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
errors object[]
status floatrequired
detail stringnullablerequired
title stringrequired
{
"errors": [
{
"status": 500,
"detail": "",
"title": "Unknown error"
}
]
}
Loading...