POST
/
v1
/
payments

Authorizations

Authorization
string
headerrequired

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
order_id
string
required
amount
integer
required

Amount in cents

subtotal_amount
integer

The subtotal amount in cents. This amount is optionnal, it's useful to give information to the user.

shipping_amount
integer

The shipping cost in cents. This amount is optionnal, it's useful to give information to the user.

discount_amount
integer

The discount amount in cents. This amount is optionnal, it's useful to give information to the user.

tax_amount
integer

The tax amount in cents. This amount is optionnal, it's useful to give information to the user.

return_url
string
required

The return URL where the user will land after the payment has been complete. The URL will be appended with a URI query payment_status with the value corresponding to the Payment status and state with the value you provided in state.

cancel_url
string

The redirect URL used in case of payment cancel or fail.

customer_id
string

UUID of the customer

state
string

Payment state that will be used to preserve the state after the redirection to the provided return_url or cancel_url. If not state is provided Stan will generate one and transmit it to the return_url or cancel_url.

Response

200 - application/json
payment_id
string
state
string
redirect_url
string