Payments

Your Users can pay for Orders and Subscriptions. But they'll need a Payment Method.

When you want to pay, you need to use the Payment object. Together with a Payment Method, among other fields, you’ll be able to create and process payments, as well as list all available payments.

Payment Object

Attributes

Type

Description

user

object

The user associated with the Payment.

amount

number

Amount as a Float with decimal points. Example: 10.23 USD

amount_paid

number

Amount as a Float with decimal points. Example: 10.23 USD

amount_reserved

number

Amount as a Float with decimal points. Example: 10.23 USD

currency

string

3 letter ISO currency code as defined by ISO 4217.

human_id

string

Human readable ID. 6 characters long.

subject

string

Order or Subscription ID.

current_state

string

Current state of payment. Can be: created, processing, captured, succeeded, failed, cancelled, reserved, refunded, partial_refund, pending_refund, refund_failed and on_retry.

active

boolean

Default is True.

payment_date

object

Date for scheduling payment,timestamp format.

payment_method

string

ID of existing Payment Method.

billing_address

object

The Address object with billing details, for use if supported by payment provider.

description

string

Some additional description, if desired and supported by payment provider.

metadata

array

Additional information on the payment, if supported by payment provider.

status_code

string

If the payment fails, this will have some code from the chosen payment method backend.

error_message

string

If the payment fails, this will have text describing the reason.

*Paths listed below with an asterisk are accessible to both User and Admin Roles.

Payment for Orders*

Pay for an Order or multiple Orders at once.

Arguments

Type

Description

orders

array

List with Orders to be paid.

payment_method

string

Selected Payment Method id to use.

Retrieve a Payment*

Argument

Type

Description

payment-id

string

ID of the queried payment.

List all Payments*

Query Parameters

Type

Description

size

number

Number of resources per page. Default is 10.

page

number

Defines which page to retrieve. Default is 0.

from_date

number

Start date, timestamp format. Default is None.

to_date

number

End date, timestamp format. Default is None.

sort

string

Field used to sort results.

status

string

Status of the payment.

Update Payment*

Only the below fields are editable in a payment.

Arguments

Type

Description

active

boolean

Default is True.

payment_method

string

ID for payment method.

billing_address

string

The Billing Address for they payment method.

payment_date

number

Update payment date, timestamp format.

Last updated