Long Description
Endpoint to create payments on existing orders.
Payments can also be posted when orders are placed.
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 |
---|---|---|---|---|
| The type of the payment to be posted. Available types:
| String | Required | |
or
| Currently usable when your credit card gateway is Braintree. 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 use in way that does not require sending other credit card information through our API. | String | Optional | Only usable on /v9 and when |
| ID of the order on which the payment will be created | integer | Required | |
| Create payment in the opposite direction, where the order seller will refund money to the buyer. | boolean | Optional | |
| The amount of the payment. Will be created for order total if omitted. | Decimal | Optional | Maximum 2 decimal places |
| ID of an address | integer | Required if type is "credit_card" | |
| Automatically transition state from "pending" to "completed" after creation | boolean | Optional |
Examples
Request | Response |
---|---|
/v9/payments | |
{ "payments":[ { "order_id":"75155", "type":"cash", "amount":"15" } ] } | See Payments / Index |