{
  "components": {
    "schemas": {
      "ApiError401Response": {
        "properties": {
          "errors": {
            "title": "Errors",
            "type": "string"
          }
        },
        "required": [
          "errors"
        ],
        "title": "ApiError401Response",
        "type": "object"
      },
      "ApiError422Response": {
        "properties": {
          "errors": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Errors",
            "type": "object"
          }
        },
        "required": [
          "errors"
        ],
        "title": "ApiError422Response",
        "type": "object"
      },
      "ApiError423Response": {
        "properties": {
          "errors": {
            "title": "Errors",
            "type": "string"
          }
        },
        "required": [
          "errors"
        ],
        "title": "ApiError423Response",
        "type": "object"
      },
      "StartPurchaseResponse": {
        "properties": {
          "sessionId": {
            "format": "uuid",
            "title": "Sessionid",
            "type": "string"
          }
        },
        "required": [
          "sessionId"
        ],
        "title": "StartPurchaseResponse",
        "type": "object"
      },
      "SubscriptionStartResponse": {
        "properties": {
          "sessionId": {
            "format": "uuid",
            "title": "Sessionid",
            "type": "string"
          }
        },
        "required": [
          "sessionId"
        ],
        "title": "SubscriptionStartResponse",
        "type": "object"
      }
    }
  },
  "info": {
    "title": "Yoursafe Flowguard API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/purchase/start": {
      "post": {
        "description": "Use this endpoint to initiate the order process for a single purchase. \n\nResponse of this endpoint `sessionId` has to be passed to the\n [Yoursafe Flowguard SDK](https://flowguard.yoursafe.com/js/docs/) to start the payment process. \n\nThis endpoint is secured by JWTs. You can find more information how to work with JWTs in the\n[Security section](#section/Security).\n\n### JWT Payload\n\nJWT payload has to contain the following fields:\n\n| Field         | Field type       | Note                                                   |\n|:--------------|:-----------------|:-------------------------------------------------------|\n| shopId        | number or string | Shop ID from ControlCenter.                            |\n| priceAmount   | string           | In format NNN.NN                                       |\n| priceCurrency | string           | One of: USD, EUR, GBP, AUD, CAD, CHF, DKK, NOK, SEK |\n| successUrl    | string           | Max length 255 characters.                             |\n| declineUrl    | string           | Max length 255 characters.                             |\n| postbackUrl   | string           | Max length 255 characters.                             |\n| email         | string           | Max length 100 characters.                             |\n| referenceId   | string or null   | Optional. Max length 100 characters.                   |\n\n### JWT Example\n\n<style>\n  pre {\n    white-space: pre-wrap !important;\n  }\n  pre > code {\n    color: rgb(160, 251, 170) !important;\n  }\n</style>\n\n\n```\neyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaG9wSWQiOiI2NTE1MSIsInByaWNlQW1vdW50IjoiMTAuMDAiLCJwcmljZUN1cnJlbmN5IjoiVVNEIiwic3VjY2Vzc1VybCI6Imh0dHBzOi8vbWVyY2hhbnQuY29tL3N1Y2Nlc3MiLCJkZWNsaW5lVXJsIjoiaHR0cHM6Ly9tZXJjaGFudC5jb20vZGVjbGluZSIsInBvc3RiYWNrVXJsIjoiaHR0cHM6Ly9tZXJjaGFudC5jb20vcG9zdGJhY2siLCJlbWFpbCI6InNob3BlckBleGFtcGxlLmNvbSJ9.J8LY9lYSI9HWAiZPjXKLZ7dXIMno9CBIRt5fk9M5gOM\n```",
        "operationId": "start_purchase_purchase_start_post",
        "requestBody": {
          "content": {
            "application/jwt": {
              "schema": {
                "examples": [
                  "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaG9wSWQiOiI2NTE1MSIsInByaWNlQW1vdW50IjoiMTAuMDAiLCJwcmljZUN1cnJlbmN5IjoiVVNEIiwic3VjY2Vzc1VybCI6Imh0dHBzOi8vbWVyY2hhbnQuY29tL3N1Y2Nlc3MiLCJkZWNsaW5lVXJsIjoiaHR0cHM6Ly9tZXJjaGFudC5jb20vZGVjbGluZSIsInBvc3RiYWNrVXJsIjoiaHR0cHM6Ly9tZXJjaGFudC5jb20vcG9zdGJhY2siLCJlbWFpbCI6InNob3BlckBleGFtcGxlLmNvbSJ9.J8LY9lYSI9HWAiZPjXKLZ7dXIMno9CBIRt5fk9M5gOM"
                ],
                "title": "Data",
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartPurchaseResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError401Response"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError422Response"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "423": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError423Response"
                }
              }
            },
            "description": "Locked"
          }
        },
        "summary": "Start Purchase",
        "tags": [
          "Purchase"
        ]
      }
    },
    "/subscription/cancel": {
      "post": {
        "description": "This endpoint is used to cancel a subscription. \n\nThis endpoint is secured by JWTs. You can find more information how to work with JWTs in the\n[Security section](#section/Security).\n\n### JWT Payload\n\nJWT payload has to contain the following fields:\n\n| Field       | Field type       | Note                                                                        |\n|:------------|:-----------------|:----------------------------------------------------------------------------|\n| saleId      | number or string | Sale ID of subscription to cancel.                                          |\n| shopId      | number or string | Shop ID from ControlCenter.                                                 |\n| cancelledBy | string           | Optional, one of: merchant, buyer |\n\n### JWT Example\n\n<style>\n  pre {\n    white-space: pre-wrap !important;\n  }\n  pre > code {\n    color: rgb(160, 251, 170) !important;\n  }\n</style>\n\n\n```\neyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaG9wSWQiOiI2NTE1MSIsInNhbGVJZCI6IjIwODAiLCJjYW5jZWxsZWRCeSI6Im1lcmNoYW50In0.gAbebyxDsecJrriAosWvtdi-SG_dt6MTVMC6NmOGriE\n```",
        "operationId": "cancel_subscription_subscription_cancel_post",
        "requestBody": {
          "content": {
            "application/jwt": {
              "schema": {
                "examples": [
                  "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaG9wSWQiOiI2NTE1MSIsInNhbGVJZCI6IjIwODAiLCJjYW5jZWxsZWRCeSI6Im1lcmNoYW50In0.gAbebyxDsecJrriAosWvtdi-SG_dt6MTVMC6NmOGriE"
                ],
                "title": "Data",
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError401Response"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError422Response"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Cancel Subscription",
        "tags": [
          "Subscription"
        ]
      }
    },
    "/subscription/start": {
      "post": {
        "description": "Use this endpoint to initiate the subscription process.\n\nResponse of this endpoint `sessionId` has to be passed to the\n[Yoursafe Flowguard SDK](https://flowguard.yoursafe.com/js/docs/) to start the payment process.\n\nThis endpoint is secured by JWTs. You can find more information how to work with JWTs in the\n[Security section](#section/Security).\n\n### JWT Payload\n\nJWT payload has to contain the following fields:\n\n| Field            | Field type       | Note                                                           |\n|:-----------------|:-----------------|:---------------------------------------------------------------|\n| shopId           | number or string | Shop ID from ControlCenter.                                    |\n| priceAmount      | string           | In format NNN.NN                                               |\n| priceCurrency    | string           | One of: USD, EUR, GBP, AUD, CAD, CHF, DKK, NOK, SEK         |\n| successUrl       | string           | Max length 255 characters.                                     |\n| declineUrl       | string           | Max length 255 characters.                                     |\n| postbackUrl      | string           | Max length 255 characters.                                     |\n| email            | string           | Max length 100 characters.                                     |\n| subscriptionType | string           | One of: recurring, one-time |\n| period           | string           | In ISO 8601 period format (e.g. P30D, P1M, P1Y)                |\n| referenceId      | string or null   | Optional. Max length 100 characters.                           |\n| trialAmount      | string or null   | Optional. In format NNN.NN                                     |\n| trialPeriod      | string or null   | Optional. In ISO 8601 period format (e.g. P30D, P1M, P1Y)      |\n\n### Period format\nPeriod consists of 3 parts (P, number, unit). Units can be: D - day, M - month, Y - year.\nFor example:\n- P30D - 30 days\n- P1M - 1 month\n- P1Y - 1 year\n\n#### Minimum and maximum period restrictions\n- for one-time subscription minimum period length is 2 days, maximum period length is 180 days\n- for recurring subscription minimum period length is 7 days, maximum period length is 180 days\n- maximum period can be prolonged up to 730 days if merchant has long subscriptions enabled\n\n#### Minimum and maximum trialPeriod restrictions\n- minimum trialPeriod length is 2 days, maximum trialPeriod length is 180 days\n- maximum trialPeriod can be prolonged up to 730 days if merchant has long subscriptions enabled\n\n### JWT Example\n\n<style>\n  pre {\n    white-space: pre-wrap !important;\n  }\n  pre > code {\n    color: rgb(160, 251, 170) !important;\n  }\n</style>\n\n\n```\neyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaG9wSWQiOiI2NTE1MSIsInByaWNlQW1vdW50IjoiMTAuMDAiLCJwcmljZUN1cnJlbmN5IjoiVVNEIiwic3VjY2Vzc1VybCI6Imh0dHBzOi8vbWVyY2hhbnQuY29tL3N1Y2Nlc3MiLCJkZWNsaW5lVXJsIjoiaHR0cHM6Ly9tZXJjaGFudC5jb20vZGVjbGluZSIsInBvc3RiYWNrVXJsIjoiaHR0cHM6Ly9tZXJjaGFudC5jb20vcG9zdGJhY2siLCJlbWFpbCI6InNob3BlckBleGFtcGxlLmNvbSIsInN1YnNjcmlwdGlvblR5cGUiOiJyZWN1cnJpbmciLCJwZXJpb2QiOiJQMU0iLCJ0cmlhbEFtb3VudCI6IjUuMDAiLCJ0cmlhbFBlcmlvZCI6IlAzRCJ9.EwpofyMOWGqqmk4RQU7DgQHWCxl32GQLckrNOnHBSy4\n```",
        "operationId": "start_subscription_subscription_start_post",
        "requestBody": {
          "content": {
            "application/jwt": {
              "schema": {
                "examples": [
                  "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaG9wSWQiOiI2NTE1MSIsInByaWNlQW1vdW50IjoiMTAuMDAiLCJwcmljZUN1cnJlbmN5IjoiVVNEIiwic3VjY2Vzc1VybCI6Imh0dHBzOi8vbWVyY2hhbnQuY29tL3N1Y2Nlc3MiLCJkZWNsaW5lVXJsIjoiaHR0cHM6Ly9tZXJjaGFudC5jb20vZGVjbGluZSIsInBvc3RiYWNrVXJsIjoiaHR0cHM6Ly9tZXJjaGFudC5jb20vcG9zdGJhY2siLCJlbWFpbCI6InNob3BlckBleGFtcGxlLmNvbSIsInN1YnNjcmlwdGlvblR5cGUiOiJyZWN1cnJpbmciLCJwZXJpb2QiOiJQMU0iLCJ0cmlhbEFtb3VudCI6IjUuMDAiLCJ0cmlhbFBlcmlvZCI6IlAzRCJ9.EwpofyMOWGqqmk4RQU7DgQHWCxl32GQLckrNOnHBSy4"
                ],
                "title": "Data",
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionStartResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError401Response"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError422Response"
                }
              }
            },
            "description": "Unprocessable Content"
          },
          "423": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError423Response"
                }
              }
            },
            "description": "Locked"
          }
        },
        "summary": "Start Subscription",
        "tags": [
          "Subscription"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "/api/merchant"
    }
  ],
  "tags": [
    {
      "description": "\n# Yoursafe Flowguard\n\nYoursafe Flowguard is a cutting-edge payment integration solution designed for Verotel, CardBilling,\nand Gaycharge. It provides an improved, modern alternative to redirect-based models, like FlexPay,\nby allowing you to embed secure payment iframes directly into your order pages. This streamlines\nthe buyer's experience, removes redirects, thereby improving conversion rates without compromising\ndata security or PCI compliance.\n\n## Key Benefits\n\n- **No Redirects**: Flowguard boosts conversions by keeping buyers on your website without the need\nfor redirects\n- **Fully PCI-DSS Compliant**: By using iframe components, Flowguard allows you to avoid handling\ncard-data. This significantly limits your PCI-DSS exposure\n- **Highly Customizable**: The components are fully customizable, allowing you to create a fully\nbranded, seamless checkout experience\n- **Reduced Fraud & Chargebacks**: As you are used to with our other integration methods, Flowguard\nprovides you with 3DS Support and strong fraud controls\n\n## Core Components\n\nFlowguard provides two main tools for integration: the Flowguard SDK and the Flowguard API. These\ntools ensure that sensitive card data remains isolated from the merchant while offering a seamless\nand fully customizable user experience.\n\n### Flowguard SDK\n\nThis is the JavaScript-based toolkit that enables embedding iframes securely. The iframes are hosted\non flowguard.yoursafe.com, and remain isolated from your servers. It allows you to customize the\nlook and feel of the components to seamlessly integrate with your own page design.\nSee the [Flowguard SDK docs](https://flowguard.yoursafe.com/js/docs/) for more info.\n\n### Flowguard API\n\nThis API allows you to initiate purchases and manage subscriptions. Transactions are processed in\nthe background. It also enables postback integrations, which provides you with any and all status updates.\n\n## Need help?\n\nFor any questions or technical issues, feel free to contact our support team at\nmerchantsupport@verotel.com. We're here to assist you!\n",
      "name": "Overview"
    },
    {
      "description": "\nWelcome to the Yoursafe Flowguard API documentation.\nYoursafe Flowguard is designed to seamlessly integrate secure payment processing with full control, offering\nunparalleled control over your payment flow while ensuring top-tier security and compliance.\n\n## Yoursafe Flowguard overview\nFollowing overview provides a high-level understanding of how Yoursafe Flowguard works.\n\n<img src=\"https://flowguard.yoursafe.com/js/docs/assets/flowguard_architecture.png\" alt=\"Flowguard architecture\"\nstyle=\"max-width: 600px\">\n\n## Security\nAll Yoursafe Flowguard API endpoints are secured with JWTs (Json Web Tokens), which ensures security of your data.\nJWT has to consist of three parts: header, payload, and signature. We recommend\n[JWT Debugger](https://jwt.io/#debugger-io) if you need to debug your JWTs.\n\n### JWT Header\n\nJWT header has to contain the following fields:\n| Field | Field value |\n|:------|:------------|\n| alg   | HS256       |\n| typ   | JWT         |\n\n### JWT Payload\n\nPayload for JWT is a JSON object with different fields for each endpoint.\nYou can find the required fields in the specific endpoint documentation.\n\n### JWT Signature\n\nJWT has to be signed using the **signatureKey** that you will find in the **Control\nCenter**. In the case JWT signature is not provided or is invalid, the API will return\na `401 Unauthorized error`. An example of the code\n\n### JWT Example\n```json\n// JWT Header\n{{\n    \"alg\": \"HS256\",\n    \"typ\": \"JWT\"\n}}\n// JWT Body\n{{\n    \"shopId\": \"65151\",\n    \"priceAmount\": \"10.00\",\n    \"priceCurrency\": \"USD\",\n    \"successUrl\": \"https://merchant.com/success\",\n    \"declineUrl\": \"https://merchant.com/decline\",\n    \"postbackUrl\": \"https://merchant.com/postback\",\n    \"email\": \"shoper@example.com\"\n}}\n\nconst signatureKey = \"signatureKeyFromControlCenter\";\n\nconsole.log(await signJWT(header, payload, signatureKey));\n\n// Output:\neyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaG9wSWQiOiI2NTE1MSIsInByaWNlQW1vd\nW50IjoiMTAuMDAiLCJwcmljZUN1cnJlbmN5IjoiVVNEIiwic3VjY2Vzc1VybCI6Imh0dHBzOi8\nvbWVyY2hhbnQuY29tL3N1Y2Nlc3MiLCJkZWNsaW5lVXJsIjoiaHR0cHM6Ly9tZXJjaGFudC5jb\n20vZGVjbGluZSIsInBvc3RiYWNrVXJsIjoiaHR0cHM6Ly9tZXJjaGFudC5jb20vcG9zdGJhY2s\niLCJlbWFpbCI6InNob3BlckBleGFtcGxlLmNvbSJ9.z1aqZb0YR93Dw4_Gh6mVC4EWLxs_GDBJ\nL_xEHHTeVdQ\n```\n\nAn example of the signJWT function of the example above:\n\n```\n// Signing the JWT function - or use your own implementation\nasync function signJWT(header, payload, signatureKey) {\n    const enc = new TextEncoder();\n    const base64url = (obj) =>\n        btoa(JSON.stringify(obj))\n        .replace(/=/g, \"\")\n        .replace(/\\+/g, \"-\")\n        .replace(/\\//g, \"_\");\n    const encodedHeader = base64url(header);\n    const encodedPayload = base64url(payload);\n    const data = `${encodedHeader}.${encodedPayload}`;\n    const key = await crypto.subtle.importKey(\n        \"raw\",\n        enc.encode(signatureKey),\n        { name: \"HMAC\", hash: \"SHA-256\" },\n        false,\n        [\"sign\"]\n    );\n    const sigBuffer = await crypto.subtle.sign(\"HMAC\", key, enc.encode(data));\n    const signature = btoa(String.fromCharCode(...new Uint8Array(sigBuffer)))\n    .replace(/=/g, \"\")\n    .replace(/\\+/g, \"-\")\n    .replace(/\\//g, \"_\");\n\n  return `${data}.${signature}`;\n```\n",
      "name": "Getting started"
    },
    {
      "description": "API that allows you to integrate a single secure payment for your website.",
      "name": "Purchase"
    },
    {
      "description": "API that allows you to integrate subscription payments for your website.",
      "name": "Subscription"
    },
    {
      "description": "\nThis part of documentation outlines the event types that occur during the payment process and the mechanism for\n receiving notifications via postbacks.\n\n### Postback URL Configuration\nWhen invoking the `purchase/start` or `subscription/start` endpoints, you are required to provide a `postbackUrl`.\n This URL will be used to send notifications of relevant events.\n\n### Postback Format\nThe postback will be sent as a JWT (JSON Web Token) token, which will be signed using your provided signature key.\n Upon receiving the postback, your system must respond with an HTTP status code of 200 OK in 30 seconds.\n\n### Retry Policy\nIn the event that your system does not respond with a 200 OK status code, the API will automatically retry sending\n the postback up to three (3) times.\n\n### Postback Content\nThe JWT token included in the postback will contain a field named postbackType. This field indicates the type of event\n that has occurred. Refer to the sections below for detailed information on the data structure for each event type that\n may be sent via postback.\n\n\n## Purchase approved\n\nPostback sent when a purchase is successfully completed by a buyer. <br />\nWe will automatically refund the payment if the postback is not received (if your system does not respond with 200 OK\nHTTP status) after all retries.\n\n| Field         | Field type       | Note                                                   |\n|:--------------|:-----------------|:-------------------------------------------------------|\n| postbackType  | string           | `approved`                                             |\n| orderType     | string           | `purchase`                                             |\n| saleId        | number or string |                                                        |\n| transactionId | number or string |                                                        |\n| shopId        | number or string | Shop ID from ControlCenter.                            |\n| priceAmount   | string           | In format `NNN.NN`                                     |\n| priceCurrency | string           | One of: USD, EUR, GBP, AUD, CAD, CHF, DKK, NOK, SEK |\n| referenceId   | string or null   | Optional                                               |\n\n## Purchase refund\n\nBoth chargeback and credit postbacks represent refund transactions of purchase.\nThey differ in terms of the initiator of the refund.\n\n| Field         | Field type       | Note                                                   |\n|:--------------|:-----------------|:-------------------------------------------------------|\n| postbackType  | string           | `chargeback` , `credit`                                |\n| orderType     | string           | `purchase`                                             |\n| saleId        | number or string |                                                        |\n| transactionId | number or string |                                                        |\n| shopId        | number or string | Shop ID from ControlCenter.                            |\n| parentId      | number or string | Id of transaction that is being refunded               |\n| priceAmount   | string           | In format `NNN.NN`                                     |\n| priceCurrency | string           | One of: USD, EUR, GBP, AUD, CAD, CHF, DKK, NOK, SEK |\n| referenceId   | string or null   | Optional                                               |\n\n## Subscription approved\n\nPostback sent when a subscription is successfully completed by a buyer. <br />\nWe will automatically refund the payment if the postback is not received (if your system does not respond with 200 OK\nHTTP status) after all retries.\n\n| Field             | Field type       | Note                                                                     |\n|:------------------|:-----------------|:-------------------------------------------------------------------------|\n| postbackType      | string           | `approved`                                                               |\n| orderType         | string           | `subscription`                                                           |\n| saleId            | number or string |                                                                          |\n| transactionId     | number or string |                                                                          |\n| shopId            | number or string | Shop ID from ControlCenter.                                              |\n| priceAmount       | string           | In format `NNN.NN`                                                       |\n| priceCurrency     | string           | One of: USD, EUR, GBP, AUD, CAD, CHF, DKK, NOK, SEK                   |\n| subscriptionType  | string           | `recurring` , `one-time`                                                 |\n| subscriptionPhase | string           | `normal` , `trial`                                                       |\n| nextChargeOn      | string or null   | Optional. In format `YYYY-MM-DD`. Present for recurring subscriptionType |\n| expiresOn         | string or null   | Optional. In format `YYYY-MM-DD`. Present for one-time subscriptionType. |\n| referenceId       | string or null   | Optional                                                                 |\n\n## Subscription refund\n\nBoth chargeback and credit postbacks represent refund transactions of subscription.\nThey differ in terms of the initiator of the refund.\n\n| Field             | Field type       | Note                                                   |\n|:------------------|:-----------------|:-------------------------------------------------------|\n| postbackType      | string           | `chargeback` , `credit`                                |\n| orderType         | string           | `subscription`                                         |\n| saleId            | number or string |                                                        |\n| transactionId     | number or string |                                                        |\n| shopId            | number or string | Shop ID from ControlCenter.                            |\n| parentId          | number or string | Id of transaction that is being refunded               |\n| priceAmount       | string           | In format `NNN.NN`                                     |\n| priceCurrency     | string           | One of: USD, EUR, GBP, AUD, CAD, CHF, DKK, NOK, SEK |\n| subscriptionType  | string           | `recurring` , `one-time`                               |\n| subscriptionPhase | string           | `terminated`                                           |\n| referenceId       | string or null   | Optional                                               |\n\n## Subscription rebill\n\nPostback sent when each recurring subscription payment is successfully processed. For example, if a subscription period is set do `P1M`, a rebill postback will be sent each month.\n\n| Field             | Field type       | Note                                                   |\n|:------------------|:-----------------|:-------------------------------------------------------|\n| postbackType      | string           | `rebill`                                               |\n| orderType         | string           | `subscription`                                         |\n| saleId            | number or string |                                                        |\n| transactionId     | number or string |                                                        |\n| shopId            | number or string | Shop ID from ControlCenter.                            |\n| priceAmount       | string           | In format `NNN.NN`                                     |\n| priceCurrency     | string           | One of: USD, EUR, GBP, AUD, CAD, CHF, DKK, NOK, SEK |\n| subscriptionType  | string           | `recurring`                                            |\n| subscriptionPhase | string           | `normal`                                               |\n| nextChargeOn      | string           | In format `YYYY-MM-DD`.                                |\n| referenceId       | string or null   | Optional                                               |\n\n## Subscription expiration\n\nThis postback will be sent, after the last subscription payment.\n\n| Field            | Field type       | Note                        |\n|:-----------------|:-----------------|:----------------------------|\n| postbackType     | string           | `expiry`                    |\n| orderType        | string           | `subscription`              |\n| saleId           | number or string |                             |\n| shopId           | number or string | Shop ID from ControlCenter. |\n| subscriptionType | string           | `recurring` , `one-time`    |\n| referenceId      | string or null   | Optional                    |\n\n## Subscription cancel\n\nThis postback will be sent, after the subscription is cancelled.\n\n| Field             | Field type       | Note                                       |\n|:------------------|:-----------------|:-------------------------------------------|\n| postbackType      | string           | `cancel`                                   |\n| orderType         | string           | `subscription`                             |\n| saleId            | number or string |                                            |\n| shopId            | number or string | Shop ID from ControlCenter.                |\n| subscriptionType  | string           | `recurring`                                |\n| subscriptionPhase | string           | `normal` , `trial`                         |\n| cancelledBy       | string           | `user` , `support` , `merchant` , `system` |\n| expiresOn         | string or null   | Optional. In format `YYYY-MM-DD`.          |\n| referenceId       | string or null   | Optional                                   |\n\n## Subscription uncancel\n\nThis postback will be sent, after the subscription is uncancelled.\n\n| Field             | Field type       | Note                                                                       |\n|:------------------|:-----------------|:---------------------------------------------------------------------------|\n| postbackType      | string           | `uncancel`                                                                 |\n| orderType         | string           | `subscription`                                                             |\n| saleId            | number or string |                                                                            |\n| shopId            | number or string | Shop ID from ControlCenter.                                                |\n| subscriptionType  | string           | `recurring`                                                                |\n| subscriptionPhase | string           | `normal` , `trial`                                                         |\n| uncancelledBy     | string           | `support`                                                                  |\n| nextChargeOn      | string or null   | Optional. In format `YYYY-MM-DD`. Present if subscription is still active. |\n| referenceId       | string or null   | Optional                                                                   |\n\n## Subscription extended\n\nPostback sent when subscription is extended.\n\n| Field             | Field type       | Note                                                                     |\n|:------------------|:-----------------|:-------------------------------------------------------------------------|\n| postbackType      | string           | `extend`                                                                 |\n| orderType         | string           | `subscription`                                                           |\n| saleId            | number or string |                                                                          |\n| shopId            | number or string | Shop ID from ControlCenter.                                              |\n| subscriptionType  | string           | `recurring` , `one-time`                                                 |\n| subscriptionPhase | string           | `normal` , `trial`                                                       |\n| nextChargeOn      | string or null   | Optional. In format `YYYY-MM-DD`. Present for recurring subscriptionType |\n| expiresOn         | string or null   | Optional. In format `YYYY-MM-DD`. Present for one-time subscriptionType. |\n| referenceId       | string or null   | Optional                                                                 |\n\n",
      "name": "Postbacks"
    }
  ]
}
