Skip to main content

Create a payment for an order

POST 

https://api.staging.powerapi.com/api/v1/payments

Create a payment for an order

Request

Body

required

    data

    object

    type stringrequired

    Possible values: [payments]

    attributes

    object

    stripe_token string

    Stripe reusable Source/PaymentMethod token

    stripe_payment_method_id string

    Stripe PaymentMethod ID which was saved before along with Card record

    relationships

    object

    order

    object

    data

    object

    type stringrequired

    Possible values: [order]

    id stringrequired

    Related Order ID

Responses

Schema

    any

curl -L 'https://api.staging.powerapi.com/api/v1/payments' \
-H 'Content-Type: application/vnd.api+json' \
-H 'Accept: application/vnd.api+json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"data": {
"type": "payments",
"attributes": {
"stripe_token": "string",
"stripe_payment_method_id": "string"
},
"relationships": {
"order": {
"data": {
"type": "order",
"id": "string"
}
}
}
}
}'
Request Collapse all
Base URL
https://api.staging.powerapi.com
Auth
Body required
{
  "data": {
    "type": "payments",
    "attributes": {
      "stripe_token": "string",
      "stripe_payment_method_id": "string"
    },
    "relationships": {
      "order": {
        "data": {
          "type": "order",
          "id": "string"
        }
      }
    }
  }
}
ResponseClear

Click the Send API Request button above and see the response here!