---
title: "Create payment slip"

doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-rest-api/order/payment/create-payment-slip'
  md: 'https://developer.shopline.com/docs/admin-rest-api/order/payment/create-payment-slip.md'
---
# Create payment slip

- **Base URL:** `https://{handle}.myshopline.com/admin/openapi`
- **Required Scopes:** `write_orders`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** RESTful

## Endpoint

```http
POST /orders/transactions.json
```

## Base URL

* `https://{handle}.myshopline.com/admin/openapi`

  * `{handle}`: `handle` : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is `open001.myshopline.com` , the store handle is `open001` .

## Required Permissions

* `write_orders`

## Request

### Request Headers

* `Content-Type`

  string (required)

  The field must be set to the fixed value `application/json; charset=utf-8`.

* `Authorization`

  string (required)

   The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. 

### Request Body

* `order_payment_list`

  array<object>

  orderPaymentList

  * `order_id`

    string

    Order number

  * `payment_details`

    object

    Transaction extra fields

    * `store_payment_name`

      string

      Merchant payment method name

    * `pay_channel_deal_id`

      string

      External channel payment serial number

    * `store_payment_id`

      string

      Merchant payment method ID

  * `processed_at`

    string

    Payment actual time , format : 2023-04-12T22 : 59 : 52+08 : 00

  * `status`

    string

    Payment status unpaid (unpaid), paid (payment successful), paid_failed (payment failed)

  * `amount`

    double

    Payment amount

  * `create_at`

    long

    Creation time (timestamp example: 1632638624)

  * `currency`

    string

    Currency

  * `gateway`

    string

    Payment method, only support offline payment customPay

## Response

### Status Codes

* `200`

  For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).

* `401`

  

* `429`

  

### Response Headers

* `traceId`

  A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.

### Response Body

#### 200

* `transaction_list`

  array<object>

  java.util.Random@7cfadf47

  * `amount`

    double

    Payment amount

  * `create_at`

    string

    Creation time

  * `id`

    string

    Payment slip number

  * `order_id`

    string

    Order number

  * `pay_channel_deal_id`

    string

    External channel payment serial number

  * `status`

    string

    Payment slip status


#### 401

* `errors`

  string

  Error message. 


#### 429

* `errors`

  string

  Error message. 


## OpenAPI Definition

```json
{
  "externalDocs": {
    "description": "Permission point used by the interface is `write_orders` , For more information about the use of permission points, see",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=en",
    "errorTableDescription": ""
  },
  "operationId": "xAV3BmRs",
  "parameters": [
    {
      "name": "Content-Type",
      "in": "header",
      "description": "The field must be set to the fixed value `application/json; charset=utf-8`.",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "Authorization",
      "in": "header",
      "description": " The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. ",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": " The access token for the API. Please refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then put the obtained access token into the API request header in Bearer Token.",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "order_payment_list": {
              "name": "order_payment_list",
              "description": "orderPaymentList",
              "type": "array",
              "items": {
                "name": "order_payment_list",
                "description": "orderPaymentList",
                "type": "object",
                "properties": {
                  "order_id": {
                    "name": "order_id",
                    "description": "Order number",
                    "type": "string",
                    "example": "21059591764404071557334003"
                  },
                  "payment_details": {
                    "name": "payment_details",
                    "description": "Transaction extra fields",
                    "type": "object",
                    "properties": {
                      "store_payment_name": {
                        "name": "store_payment_name",
                        "description": "Merchant payment method name",
                        "type": "string",
                        "example": "Payment name"
                      },
                      "pay_channel_deal_id": {
                        "name": "pay_channel_deal_id",
                        "description": "External channel payment serial number",
                        "type": "string",
                        "example": "1C40278814835131L"
                      },
                      "store_payment_id": {
                        "name": "store_payment_id",
                        "description": "Merchant payment method ID",
                        "type": "string",
                        "example": "146462515"
                      }
                    },
                    "required": [
                      "store_payment_id",
                      "store_payment_name"
                    ],
                    "example": {
                      "store_payment_name": "Payment name",
                      "pay_channel_deal_id": "1C40278814835131L",
                      "store_payment_id": "146462515"
                    }
                  },
                  "processed_at": {
                    "name": "processed_at",
                    "description": "Payment actual time , format : 2023-04-12T22 : 59 : 52+08 : 00",
                    "type": "string",
                    "example": "2023-04-12T22:59:52+08:00"
                  },
                  "status": {
                    "name": "status",
                    "description": "Payment status unpaid (unpaid), paid (payment successful), paid_failed (payment failed)",
                    "type": "string",
                    "example": "paid"
                  },
                  "amount": {
                    "name": "amount",
                    "description": "Payment amount",
                    "type": "double",
                    "example": 2
                  },
                  "create_at": {
                    "name": "create_at",
                    "description": "Creation time (timestamp example: 1632638624)",
                    "type": "long",
                    "example": 1632638624
                  },
                  "currency": {
                    "name": "currency",
                    "description": "Currency",
                    "type": "string",
                    "example": "USD"
                  },
                  "gateway": {
                    "name": "gateway",
                    "description": "Payment method, only support offline payment customPay",
                    "type": "string",
                    "example": "customPay"
                  }
                },
                "required": [
                  "amount",
                  "currency",
                  "gateway",
                  "order_id",
                  "status"
                ],
                "example": {
                  "gateway": "customPay",
                  "order_id": "21059591764404071557334003",
                  "payment_details": {
                    "store_payment_name": "Payment name",
                    "pay_channel_deal_id": "1C40278814835131L",
                    "store_payment_id": "146462515"
                  },
                  "processed_at": "2023-04-12T22:59:52+08:00",
                  "status": "paid",
                  "amount": 2,
                  "create_at": 1632638624,
                  "currency": "USD"
                }
              },
              "example": [
                {
                  "processed_at": "2023-04-12T22:59:52+08:00",
                  "status": "paid",
                  "amount": 2,
                  "create_at": 1632638624,
                  "currency": "USD",
                  "gateway": "customPay",
                  "order_id": "21059591764404071557334003",
                  "payment_details": {
                    "pay_channel_deal_id": "1C40278814835131L",
                    "store_payment_id": "146462515",
                    "store_payment_name": "Payment name"
                  }
                }
              ]
            }
          },
          "required": [
            "order_payment_list"
          ],
          "example": {
            "order_payment_list": [
              {
                "status": "paid",
                "amount": 2,
                "create_at": 1632638624,
                "currency": "USD",
                "gateway": "customPay",
                "order_id": "21059591764404071557334003",
                "payment_details": {
                  "store_payment_name": "Payment name",
                  "pay_channel_deal_id": "1C40278814835131L",
                  "store_payment_id": "146462515"
                },
                "processed_at": "2023-04-12T22:59:52+08:00"
              }
            ]
          }
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).",
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "transaction_list": {
                "name": "transaction_list",
                "description": "java.util.Random@7cfadf47",
                "type": "array",
                "items": {
                  "name": "transaction_list",
                  "description": "java.util.Random@7cfadf47",
                  "type": "object",
                  "properties": {
                    "amount": {
                      "name": "amount",
                      "description": "Payment amount",
                      "type": "double",
                      "example": 2
                    },
                    "create_at": {
                      "name": "create_at",
                      "description": "Creation time",
                      "type": "string",
                      "example": "1632638624"
                    },
                    "id": {
                      "name": "id",
                      "description": "Payment slip number",
                      "type": "string",
                      "example": "23059287225140757637516981"
                    },
                    "order_id": {
                      "name": "order_id",
                      "description": "Order number",
                      "type": "string",
                      "example": "21059591764404071557334003"
                    },
                    "pay_channel_deal_id": {
                      "name": "pay_channel_deal_id",
                      "description": "External channel payment serial number",
                      "type": "string",
                      "example": "1C40278814835131L"
                    },
                    "status": {
                      "name": "status",
                      "description": "Payment slip status",
                      "type": "string",
                      "example": "paid"
                    }
                  },
                  "example": {
                    "id": "23059287225140757637516981",
                    "order_id": "21059591764404071557334003",
                    "pay_channel_deal_id": "1C40278814835131L",
                    "status": "paid",
                    "amount": 2,
                    "create_at": "1632638624"
                  }
                },
                "example": [
                  {
                    "order_id": "21059591764404071557334003",
                    "pay_channel_deal_id": "1C40278814835131L",
                    "status": "paid",
                    "amount": 2,
                    "create_at": "1632638624",
                    "id": "23059287225140757637516981"
                  }
                ]
              }
            },
            "example": {
              "transaction_list": [
                {
                  "pay_channel_deal_id": "1C40278814835131L",
                  "status": "paid",
                  "amount": 2,
                  "create_at": "1632638624",
                  "id": "23059287225140757637516981",
                  "order_id": "21059591764404071557334003"
                }
              ]
            }
          }
        }
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "method": "post",
  "path": "/orders/transactions.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`handle` : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is `open001.myshopline.com` , the store handle is `open001` ."
        }
      }
    }
  ],
  "info": {
    "title": "Create payment slip",
    "version": "v20270301"
  },
  "authIndexes": [
    "write_orders"
  ]
}
```