Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Page Properties
labelapi_docs_payments


Name

Payments Create

Description

Create a payment on an order.

Type

POST

URL

/v9/payments


Long Description

Endpoint to create payments on existing orders.

Payments can also be posted when orders are placed. 


Note

Note: Payments of type

...

credit_card

...

will fail, even in Sandbox, if you have not yet signed up for the Braintree gateway.

Parameters

Name

Description

Value Type

Required

Other

type

amount

The

type

amount of the payment

to be posted. Available types:
  • cash
  • check
  • paypal
  • money_order
  • tbd
  • evopay
  • credit_card
  • offline
StringRequiredorder_idID of the order on which the payment will be createdintegerRequired

. Will be created for order total if omitted.

Decimal

Optional

Maximum 2 decimal places

billing_address_id

ID of a Client Address which is the billing address for the credit card being used.

Integer

Required if type is "credit_card"

is_completed

Automatically transition state from "pending" to "completed" after creation

Boolean

Optional

is_refund

Create payment in the opposite direction, where the order seller will refund money to the buyer.

boolean

Boolean

Optional

amountThe amount

order_id

ID of the

payment. Will

order on which the payment will be created

for order total if omitted.Decimal

Integer

Optional

billing_address_idID of an addressintegerRequired if type is "credit_card"is_completedAutomatically transition state from "pending" to "completed" after creationbooleanOptional

...

payment_method_token

or

payment_method_nonce

or

token (affiliates)

Currently usable when you are using our Braintree credit card gateway. Use the methods Braintree provides such as their Drop-in UI or Hosted Fields to retrieve either a reusable token or a single-use nonce and pass to us in way that does not require sending other credit card information through our API.

String

Required when type is credit_card.

Only usable on /v9 and when type is credit_card.

type

The type of the payment to be posted. Available types:

  • cash

  • check

  • credit_card

  • evopay

  • money_order

  • offline

  • paypal

  • tbd

String

Required



Examples

Request

Response

/v9/payments 


Code Block
language
ruby
json
themeConfluence
{
  "payments":[
    {
      "order_id":"75155",
      "type":"cash",
      "amount":"15"
    }
  ]
}
 



See Payments / Index