{
    "item": [
        {
            "name": "API Calls",
            "description": "API Calls to request customer consent, request `payment_token` and use it to generate automated payments",
            "item": [
                {
                    "id": "103042f4-0c62-493c-87ed-130b8cea6f97",
                    "name": "InitiatePayment",
                    "request": {
                        "name": "InitiatePayment",
                        "description": {
                            "content": "This API Call can be used for several different purposes:\n\n- Initiate a Payment and request customer's consent \n\n- Request customer's consent without initiating a payment (separate consent). In this case the `amount` should be set to `0`\n\n- Initiate an automated payment using the received `payment_token`\n\n- Enable the customer for One-Click checkout. \n\n\n## Initiate a Payment and request customer's consent \n\nIn case you want to request customer's consent and at the same time initiate a payment (financial transaction), you should provide `automatic_payment_consent` parameter with one of the following values\n\n**OPTIONAL** - allowing the payment to be completed without granting consent, or\n\n**MANDATORY** - requiring the customer to provide consent in order to complete the payment.\n\n\n## Request customer's consent without initiating a payment\n\nThe same API call can also be used to request customer consent without initiating a payment (separate payment consent). This can be done by setting the amount parameter to `0`.\n\nIn this case, the response differs slightly:\n\nthe returned `auth_url` redirects the customer to the PaysafeCard login panel instead of the payment panel, allowing the customer to log in and provide consent, \n\nthe `amount` will be `0` as well as \n\nthe `automatic_payment_consent` will be **MANDATORY**.  \n\n\n## Initiate an automated payment\n\nThe same API Call can also be used to initiate an automated payment. This is done by providing the received `payment_token` as a parameter to the body of the request.\n\n\n## Enable the customer for One-Click checkout\n\nYou can also use this API Call to allow the customer to pay without the need to login at all in Payment Panel. In this case the customer will be redirected to PaysafeCard's payment panel, however will only need to click Pay and won't need to login.",
                            "type": "text/plain"
                        },
                        "url": {
                            "path": [
                                "payments"
                            ],
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "query": [],
                            "variable": []
                        },
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "method": "POST",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"type\": \"<string>\",\n  \"amount\": \"<float>\",\n  \"currency\": \"<string>\",\n  \"redirect\": {\n    \"success_url\": \"<uri>\",\n    \"failure_url\": \"<uri>\"\n  },\n  \"notification_url\": \"<uri>\",\n  \"customer\": {\n    \"id\": \"<string>\",\n    \"min_age\": \"<number>\",\n    \"kyc_level\": \"<string>\",\n    \"country_restriction\": \"<string>\"\n  },\n  \"automatic_payment_consent\": \"<string>\",\n  \"submerchant_id\": \"<string>\",\n  \"shop_id\": \"<string>\"\n}",
                            "options": {
                                "raw": {
                                    "headerFamily": "json",
                                    "language": "json"
                                }
                            }
                        },
                        "auth": {
                            "type": "basic",
                            "basic": [
                                {
                                    "key": "username",
                                    "value": "{{basicAuthUsername}}"
                                },
                                {
                                    "key": "password",
                                    "value": "{{basicAuthPassword}}"
                                }
                            ]
                        }
                    },
                    "response": [
                        {
                            "id": "08da65e5-3187-4b48-b7ce-dae1dec0c1cf",
                            "name": "Depending on the type of request, the response could either be:\n\n- a financial transaction and also containing the customer's consent (`association_id`)\n- containing only the customer's consent (`association_id`). The `amount` must have been set to `0` in the request\n- a response to an automated payment. `payment_token` used in the request.",
                            "originalRequest": {
                                "url": {
                                    "path": [
                                        "payments"
                                    ],
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "query": [],
                                    "variable": []
                                },
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "description": {
                                            "content": "Added as a part of security scheme: basic",
                                            "type": "text/plain"
                                        },
                                        "key": "Authorization",
                                        "value": "Basic <credentials>"
                                    }
                                ],
                                "method": "POST",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n  \"type\": \"<string>\",\n  \"amount\": \"<float>\",\n  \"currency\": \"<string>\",\n  \"redirect\": {\n    \"success_url\": \"<uri>\",\n    \"failure_url\": \"<uri>\"\n  },\n  \"notification_url\": \"<uri>\",\n  \"customer\": {\n    \"id\": \"<string>\",\n    \"min_age\": \"<number>\",\n    \"kyc_level\": \"<string>\",\n    \"country_restriction\": \"<string>\"\n  },\n  \"automatic_payment_consent\": \"<string>\",\n  \"submerchant_id\": \"<string>\",\n  \"shop_id\": \"<string>\"\n}",
                                    "options": {
                                        "raw": {
                                            "headerFamily": "json",
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "Created",
                            "code": 201,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n  \"object\": \"<string>\",\n  \"id\": \"<string>\",\n  \"created\": \"<long>\",\n  \"updated\": \"<long>\",\n  \"currency\": \"<string>\",\n  \"status\": \"<string>\",\n  \"type\": \"<string>\",\n  \"redirect\": {\n    \"success_url\": \"<uri>\",\n    \"failure_url\": \"<uri>\",\n    \"auth_url\": \"<uri>\"\n  },\n  \"customer\": {\n    \"id\": \"<string>\"\n  },\n  \"amount\": \"<float>\",\n  \"notification_url\": \"<uri>\",\n  \"automatic_payment_consent\": \"<string>\",\n  \"association_id\": \"<string>\",\n  \"submerchant_id\": \"<string>\"\n}",
                            "cookie": [],
                            "_postman_previewlanguage": "json"
                        },
                        {
                            "id": "6e632ab3-1cf1-434f-9f92-d4542afd741c",
                            "name": "Bad request - invalid input or merchant not found",
                            "originalRequest": {
                                "url": {
                                    "path": [
                                        "payments"
                                    ],
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "query": [],
                                    "variable": []
                                },
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "description": {
                                            "content": "Added as a part of security scheme: basic",
                                            "type": "text/plain"
                                        },
                                        "key": "Authorization",
                                        "value": "Basic <credentials>"
                                    }
                                ],
                                "method": "POST",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n  \"type\": \"<string>\",\n  \"amount\": \"<float>\",\n  \"currency\": \"<string>\",\n  \"redirect\": {\n    \"success_url\": \"<uri>\",\n    \"failure_url\": \"<uri>\"\n  },\n  \"notification_url\": \"<uri>\",\n  \"customer\": {\n    \"id\": \"<string>\",\n    \"min_age\": \"<number>\",\n    \"kyc_level\": \"<string>\",\n    \"country_restriction\": \"<string>\"\n  },\n  \"automatic_payment_consent\": \"<string>\",\n  \"submerchant_id\": \"<string>\",\n  \"shop_id\": \"<string>\"\n}",
                                    "options": {
                                        "raw": {
                                            "headerFamily": "json",
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "Bad Request",
                            "code": 400,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n  \"code\": \"<string>\",\n  \"message\": \"<string>\",\n  \"number\": \"<integer>\"\n}",
                            "cookie": [],
                            "_postman_previewlanguage": "json"
                        }
                    ],
                    "event": [],
                    "protocolProfileBehavior": {
                        "disableBodyPruning": true
                    }
                },
                {
                    "id": "3ae855bd-373b-41ba-acb9-85e6ae9234d1",
                    "name": "SeparateConsent",
                    "request": {
                        "name": "SeparateConsent",
                        "description": {
                            "content": "\nInitiates a PaysafeCard transaction to request customer consent.\n\nThe customer provides consent by logging in to their PaysafeCard account and confirming the request.\n\nThis API call allows consent to be obtained independently and is not linked to an actual payment transaction.",
                            "type": "text/plain"
                        },
                        "url": {
                            "path": [
                                "association"
                            ],
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "query": [],
                            "variable": []
                        },
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "method": "POST",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"currency\": \"<string>\",\n  \"customer\": {\n    \"id\": \"<string>\"\n  },\n  \"success_url\": \"<uri>\",\n  \"failure_url\": \"<uri>\"\n}",
                            "options": {
                                "raw": {
                                    "headerFamily": "json",
                                    "language": "json"
                                }
                            }
                        },
                        "auth": {
                            "type": "basic",
                            "basic": [
                                {
                                    "key": "username",
                                    "value": "{{basicAuthUsername}}"
                                },
                                {
                                    "key": "password",
                                    "value": "{{basicAuthPassword}}"
                                }
                            ]
                        }
                    },
                    "response": [
                        {
                            "id": "504d50b8-6df7-4af0-964a-cf7c06660e67",
                            "name": "Transaction created successfully. \n\nMerchant provided with the association_url to redirect the customer to, as well as with the `association_id`.",
                            "originalRequest": {
                                "url": {
                                    "path": [
                                        "association"
                                    ],
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "query": [],
                                    "variable": []
                                },
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "description": {
                                            "content": "Added as a part of security scheme: basic",
                                            "type": "text/plain"
                                        },
                                        "key": "Authorization",
                                        "value": "Basic <credentials>"
                                    }
                                ],
                                "method": "POST",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n  \"currency\": \"<string>\",\n  \"customer\": {\n    \"id\": \"<string>\"\n  },\n  \"success_url\": \"<uri>\",\n  \"failure_url\": \"<uri>\"\n}",
                                    "options": {
                                        "raw": {
                                            "headerFamily": "json",
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "Created",
                            "code": 201,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n  \"request_id\": \"<string>\",\n  \"association_id\": \"<string>\",\n  \"association_url\": \"<uri>\"\n}",
                            "cookie": [],
                            "_postman_previewlanguage": "json"
                        },
                        {
                            "id": "f22034b2-061f-4c0e-a8cb-164b7a431170",
                            "name": "Bad request - invalid input or merchant not found",
                            "originalRequest": {
                                "url": {
                                    "path": [
                                        "association"
                                    ],
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "query": [],
                                    "variable": []
                                },
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "description": {
                                            "content": "Added as a part of security scheme: basic",
                                            "type": "text/plain"
                                        },
                                        "key": "Authorization",
                                        "value": "Basic <credentials>"
                                    }
                                ],
                                "method": "POST",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n  \"currency\": \"<string>\",\n  \"customer\": {\n    \"id\": \"<string>\"\n  },\n  \"success_url\": \"<uri>\",\n  \"failure_url\": \"<uri>\"\n}",
                                    "options": {
                                        "raw": {
                                            "headerFamily": "json",
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "Bad Request",
                            "code": 400,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n  \"code\": \"<string>\",\n  \"message\": \"<string>\",\n  \"number\": \"<integer>\"\n}",
                            "cookie": [],
                            "_postman_previewlanguage": "json"
                        }
                    ],
                    "event": [],
                    "protocolProfileBehavior": {
                        "disableBodyPruning": true
                    }
                },
                {
                    "id": "d25b68a4-dc0f-403c-abbe-5e354c81fc3e",
                    "name": "GetPaymentToken",
                    "request": {
                        "name": "GetPaymentToken",
                        "description": {
                            "content": "\nTo initiate payment transactions on behalf of a customer, the merchant needs a `payment_token`.\n\nThe `payment_token` is obtained once the customer has provided consent and can be retrieved using the `association_id` returned in the body of the response to the consent request.",
                            "type": "text/plain"
                        },
                        "url": {
                            "path": [
                                "association",
                                ":association_id"
                            ],
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "query": [],
                            "variable": [
                                {
                                    "type": "any",
                                    "value": "<string>",
                                    "key": "association_id",
                                    "disabled": false,
                                    "description": {
                                        "content": "(Required) ID of the Association between the merchant and customer. Returned in response to API request to obtain the customer's consent.",
                                        "type": "text/plain"
                                    }
                                }
                            ]
                        },
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "method": "GET",
                        "body": {},
                        "auth": {
                            "type": "basic",
                            "basic": [
                                {
                                    "key": "username",
                                    "value": "{{basicAuthUsername}}"
                                },
                                {
                                    "key": "password",
                                    "value": "{{basicAuthPassword}}"
                                }
                            ]
                        }
                    },
                    "response": [
                        {
                            "id": "a45510da-1fa5-4b80-a5d4-d94bc97a654e",
                            "name": "Association created successfully and `payment_token` returned",
                            "originalRequest": {
                                "url": {
                                    "path": [
                                        "association",
                                        ":association_id"
                                    ],
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "query": [],
                                    "variable": [
                                        {
                                            "disabled": false,
                                            "description": {
                                                "content": "(Required) ID of the Association between the merchant and customer. Returned in response to API request to obtain the customer's consent.",
                                                "type": "text/plain"
                                            },
                                            "type": "any",
                                            "value": "<string>",
                                            "key": "association_id"
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "description": {
                                            "content": "Added as a part of security scheme: basic",
                                            "type": "text/plain"
                                        },
                                        "key": "Authorization",
                                        "value": "Basic <credentials>"
                                    }
                                ],
                                "method": "GET",
                                "body": {}
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n  \"mid\": \"<string>\",\n  \"customer\": {\n    \"id\": \"<string>\",\n    \"email\": \"<string>\"\n  },\n  \"association_id\": \"<string>\",\n  \"success_url\": \"<uri>\",\n  \"failure_url\": \"<uri>\",\n  \"status\": \"<string>\",\n  \"created\": \"<long>\",\n  \"updated\": \"<long>\",\n  \"payment_token\": \"<string>\",\n  \"expiration_date\": \"<long>\"\n}",
                            "cookie": [],
                            "_postman_previewlanguage": "json"
                        },
                        {
                            "id": "97adb6bb-7df4-420e-b04d-6d5ecc8d1b29",
                            "name": "Transaction not found",
                            "originalRequest": {
                                "url": {
                                    "path": [
                                        "association",
                                        ":association_id"
                                    ],
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "query": [],
                                    "variable": [
                                        {
                                            "disabled": false,
                                            "description": {
                                                "content": "(Required) ID of the Association between the merchant and customer. Returned in response to API request to obtain the customer's consent.",
                                                "type": "text/plain"
                                            },
                                            "type": "any",
                                            "value": "<string>",
                                            "key": "association_id"
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "description": {
                                            "content": "Added as a part of security scheme: basic",
                                            "type": "text/plain"
                                        },
                                        "key": "Authorization",
                                        "value": "Basic <credentials>"
                                    }
                                ],
                                "method": "GET",
                                "body": {}
                            },
                            "status": "Not Found",
                            "code": 404,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n  \"code\": \"<string>\",\n  \"message\": \"<string>\",\n  \"number\": \"<integer>\"\n}",
                            "cookie": [],
                            "_postman_previewlanguage": "json"
                        }
                    ],
                    "event": [],
                    "protocolProfileBehavior": {
                        "disableBodyPruning": true
                    }
                },
                {
                    "id": "bdff290e-fc2a-421a-8af0-1162b5855f39",
                    "name": "RevokeAssociation",
                    "request": {
                        "name": "RevokeAssociation",
                        "description": {
                            "content": "\nThis API call enables the merchant to revoke the association between the customer's account and the merchant. \n\nIf the association ID was already revoked, we instead return just the status of the association ID (same response body). \n\nThe status can be `INVALIDATED_BY_SYSTEM`, `INVALIDATED_BY_ADMIN`, `INVALIDATED_BY_USER` or `INVALIDATED_BY_MERCHANT`.",
                            "type": "text/plain"
                        },
                        "url": {
                            "path": [
                                "association",
                                ":association_id"
                            ],
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "query": [],
                            "variable": [
                                {
                                    "type": "any",
                                    "value": "<string>",
                                    "key": "association_id",
                                    "disabled": false,
                                    "description": {
                                        "content": "(Required) ID of the Association between the merchant and customer. Returned in response to API request to obtain the customer's consent.",
                                        "type": "text/plain"
                                    }
                                }
                            ]
                        },
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "method": "DELETE",
                        "body": {},
                        "auth": {
                            "type": "basic",
                            "basic": [
                                {
                                    "key": "username",
                                    "value": "{{basicAuthUsername}}"
                                },
                                {
                                    "key": "password",
                                    "value": "{{basicAuthPassword}}"
                                }
                            ]
                        }
                    },
                    "response": [
                        {
                            "id": "a575d7c7-2c5b-4e4f-9b2e-a65f84a0646b",
                            "name": "Association successfully revoked",
                            "originalRequest": {
                                "url": {
                                    "path": [
                                        "association",
                                        ":association_id"
                                    ],
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "query": [],
                                    "variable": [
                                        {
                                            "disabled": false,
                                            "description": {
                                                "content": "(Required) ID of the Association between the merchant and customer. Returned in response to API request to obtain the customer's consent.",
                                                "type": "text/plain"
                                            },
                                            "type": "any",
                                            "value": "<string>",
                                            "key": "association_id"
                                        }
                                    ]
                                },
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "description": {
                                            "content": "Added as a part of security scheme: basic",
                                            "type": "text/plain"
                                        },
                                        "key": "Authorization",
                                        "value": "Basic <credentials>"
                                    }
                                ],
                                "method": "DELETE",
                                "body": {}
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n  \"association_id\": \"<string>\",\n  \"status\": \"<string>\"\n}",
                            "cookie": [],
                            "_postman_previewlanguage": "json"
                        }
                    ],
                    "event": [],
                    "protocolProfileBehavior": {
                        "disableBodyPruning": true
                    }
                }
            ]
        }
    ],
    "event": [],
    "variable": [
        {
            "key": "baseUrl",
            "value": "https://api.paysafecard.com/v1"
        }
    ],
    "info": {
        "_postman_id": "874e49d7-b76c-486c-bcc9-d838c4b7ebdc",
        "name": "Paysafecard Payments API",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
        "description": {
            "content": "## Overview\n\nThis is an extension of the base PaysafeCard API calls in order to enable merchants request consent and create association to a customer's PaysafeCard account so in the future they can initiate payments on the customer's behalf.\n\n## Authentication\n\nAuthentication is performed using HTTP Basic Authentication.\n\nThe Authorization header must contain a Base64-encoded value of the provided `API Key`\n\ni.e.: the provided API Key is `psc_8oJu3x6IYttbIusxpBUG7XNFohhBpjw`\n\nThe value that needs to be provided in the Authorization Header is:\n\n```\nBasic cHNjXzhvSnUzeDZJWXR0Ykl1c3hwQlVHN1hORm9oaEJwanc=\n```",
            "type": "text/plain"
        }
    }
}