# Enable payment method issuer Enable an issuer for a payment method on a specific profile. Currently only the payment methods `voucher` and `giftcard` are supported. When using a profile-specific API credential, the alias `me` can be used instead of the profile ID to refer to the current profile. > 🔑 Access with > > [API key](/reference/authentication) > > [Organization access token with **profiles.write**](/reference/authentication) > > [OAuth access with **profiles.write**](/reference/authentication) # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Accepting payments", "version": "1.0.0", "license": { "name": "Attribution-NonCommercial-ShareAlike 4.0 International", "identifier": "CC-BY-NC-SA-4.0" } }, "servers": [ { "url": "https://api.mollie.com/v2" } ], "security": [ { "apiKey": [] }, { "organizationAccessToken": [] }, { "oAuth": [] } ], "paths": { "/profiles/{profileId}/methods/{methodId}/issuers/{issuerId}": { "parameters": [ { "name": "profileId", "description": "Provide the ID of the related profile.", "in": "path", "required": true, "schema": { "oneOf": [ { "type": "string", "pattern": "^pfl_.+$", "example": "pfl_5B8cwPMGnU", "description": "The identifier referring to the [profile](get-profile) this entity belongs to.\n\nMost API credentials are linked to a single profile. In these cases the `profileId` can be omitted in the creation request. For organization-level credentials such as OAuth access tokens however, the `profileId` parameter is required." }, { "type": "string", "enum": [ "me" ], "default": "me" } ] } }, { "name": "methodId", "description": "Provide the ID of the related payment method.\n\nPossible values: `voucher` `giftcard`", "in": "path", "required": true, "schema": { "type": "string", "example": "voucher" } }, { "name": "issuerId", "description": "Provide the ID of the related issuer.", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "example": "edenred-france-sports" } } ], "post": { "summary": "Enable payment method issuer", "x-speakeasy-name-override": "enable-issuer", "tags": [ "Methods API" ], "operationId": "enable-method-issuer", "security": [ { "apiKey": [] }, { "organizationAccessToken": [ "profiles.write" ] }, { "oAuth": [ "profiles.write" ] } ], "description": "Enable an issuer for a payment method on a specific profile.\n\nCurrently only the payment methods `voucher` and `giftcard` are supported.\n\nWhen using a profile-specific API credential, the alias `me` can be used instead of the profile ID to refer to the current profile.\n\n> 🔑 Access with\n>\n> [API key](/reference/authentication)\n>\n> [Organization access token with **profiles.write**](/reference/authentication)\n>\n> [OAuth access with **profiles.write**](/reference/authentication)", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "contractId": { "type": [ "string", "null" ], "description": "When enabling a voucher issuer, an inbetween party may be involved which you have a contract with. Provide the contract ID for the first time you enable an issuer via this contractor.\n\nYou can update the contract ID as long as it is not approved yet, by repeating the API call with a different contract ID.", "example": "ideal" } } } } } }, "responses": { "200": { "description": "The payment method issuer object.", "content": { "application/hal+json": { "schema": { "oneOf": [ { "type": "object", "required": [ "resource", "id", "description", "status", "_links" ], "properties": { "resource": { "type": "string", "description": "Indicates the response contains a payment method issuer object. Will always contain the string `issuer` for this endpoint.", "readOnly": true, "default": "issuer" }, "id": { "type": "string", "description": "The unique identifier of the payment method issuer.", "readOnly": true, "example": "festivalcadeau" }, "description": { "type": "string", "description": "The full name of the payment method issuer.", "readOnly": true, "example": "FestivalCadeau Giftcard" }, "status": { "allOf": [ { "type": "string", "description": "The status of the issuer. If the status is `pending-issuer`, an additional action from your side may be required with the issuer.\n\nPossible values: `activated` `pending-issuer`", "example": "activated" } ], "readOnly": true }, "_links": { "type": "object", "description": "An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.", "properties": { "self": { "type": "object", "description": "In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "description": "The actual URL string.", "example": "https://..." }, "type": { "type": "string", "description": "The content type of the page or endpoint the URL points to.", "example": "application/hal+json" } } }, "documentation": { "type": "object", "description": "In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "description": "The actual URL string.", "example": "https://..." }, "type": { "type": "string", "description": "The content type of the page or endpoint the URL points to.", "example": "application/hal+json" } } } }, "readOnly": true } } }, { "type": "object", "required": [ "resource", "id", "name", "image", "status", "contractor", "_links" ], "properties": { "resource": { "type": "string", "description": "Indicates the response contains a payment method issuer object. Will always contain the string `issuer` for this endpoint.", "readOnly": true, "default": "issuer" }, "id": { "type": "string", "description": "The unique identifier of the payment method issuer.", "readOnly": true, "example": "edenred-belgium-eco" }, "name": { "type": "string", "description": "The full name of the payment method issuer.", "readOnly": true, "example": "Edenred Eco" }, "image": { "type": "object", "description": "URLs of images representing the payment method issuer.", "properties": { "size1x": { "type": "string", "description": "The URL pointing to an icon of 32 by 24 pixels.", "example": "https://..." }, "size2x": { "type": "string", "description": "The URL pointing to an icon of 64 by 48 pixels.", "example": "https://..." }, "svg": { "type": "string", "description": "The URL pointing to a vector version of the icon. Usage of this format is preferred, since the icon can scale to any desired size without compromising visual quality.", "example": "https://..." } }, "readOnly": true }, "status": { "allOf": [ { "type": "string", "description": "The status of the issuer. If the status is `pending-issuer`, an additional action from your side may be required with the issuer.\n\nPossible values: `activated` `pending-issuer`", "example": "activated" } ], "readOnly": true }, "contractor": { "type": "object", "description": "Information regarding the *contractor*. Only relevant for `voucher` issuers.", "properties": { "id": { "type": "string", "example": "Apetiz" }, "name": { "type": "string", "example": "Apetiz" }, "contractId": { "type": "string", "example": "someContractId" } }, "readOnly": true }, "_links": { "type": "object", "description": "An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.", "properties": { "self": { "type": "object", "description": "In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "description": "The actual URL string.", "example": "https://..." }, "type": { "type": "string", "description": "The content type of the page or endpoint the URL points to.", "example": "application/hal+json" } } }, "documentation": { "type": "object", "description": "In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "description": "The actual URL string.", "example": "https://..." }, "type": { "type": "string", "description": "The content type of the page or endpoint the URL points to.", "example": "application/hal+json" } } } }, "readOnly": true } } } ] }, "examples": { "enable-method-issuer-200-1": { "summary": "The payment method issuer object", "value": { "resource": "issuer", "id": "festivalcadeau", "description": "FestivalCadeau Giftcard", "status": "pending-issuer", "_links": { "self": { "href": "...", "type": "application/hal+json" }, "documentation": { "href": "...", "type": "text/html" } } } } } } } }, "404": { "description": "No entity with this ID exists.", "content": { "application/hal+json": { "schema": { "type": "object", "description": "An error response object.", "required": [ "status", "title", "detail", "_links" ], "properties": { "status": { "type": "integer", "description": "The status code of the error message. This is always the same code as the status code of the HTTP message itself.", "minimum": 400, "maximum": 599, "example": 404 }, "title": { "type": "string", "description": "The HTTP reason phrase of the error. For example, for a `404` error, the `title` will be `Not Found`.", "example": "Not Found" }, "detail": { "type": "string", "description": "A detailed human-readable description of the error that occurred.", "example": "The resource does not exist" }, "field": { "type": "string", "description": "If the error was caused by a value provided by you in a specific field, the `field` property will contain the name of the field that caused the issue.", "example": "description" }, "_links": { "type": "object", "required": [ "documentation" ], "properties": { "documentation": { "type": "object", "description": "The URL to the generic Mollie API error handling guide.", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "example": "https://docs.mollie.com/errors" }, "type": { "type": "string", "example": "text/html" } } } } } } }, "example": { "status": 404, "title": "Not Found", "detail": "No entity exists with token 'uct_abcDEFghij123456789'", "_links": { "documentation": { "href": "...", "type": "text/html" } } } } } } }, "x-readme": { "code-samples": [ { "language": "shell", "code": "curl -X POST https://api.mollie.com/v2/profiles/pfl_QkEhN94Ba/methods/giftcard/issuers/festivalcadeau \\\n -H \"Authorization: Bearer live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM\"" }, { "language": "php", "code": "setApiKey(\"live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM\");\n\n$issuer = $mollie->send(\n new EnableMethodIssuerRequest(\n profileId: \"pfl_QkEhN94Ba\",\n methodId: \"giftcard\",\n issuerId: \"festivalcadeau\"\n )\n);", "install": "composer require mollie/mollie-api-php" }, { "language": "node", "code": "const { createMollieClient } = require('@mollie/api-client');\nconst mollieClient = createMollieClient({ apiKey: 'live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' });\n\nconst payment = await mollieClient.profileGiftcardIssuers.enable({\n id: 'festivalcadeau',\n profileId: 'pfl_QkEhN94Ba'\n});\n\n// For vouchers, use `MollieClient.profileVoucherIssuers`", "install": "npm install @mollie/api-client" }, { "language": "python", "code": "from mollie.api.client import Client\n\nmollie_client = Client()\nmollie_client.set_api_key(\"live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM\")\n\nprofile = mollie_client.profiles.get(\"pfl_QkEhN94Ba\")\nissuer = profile.methods.enable_issuer(\"giftcard\", \"festivalcadeau\")", "install": "pip install mollie-api-python" }, { "language": "ruby", "code": "# We don't have a Ruby code example for this\n# API call yet.\n#\n# If you have some time to spare, feel free to\n# share suggestions on our Discord:\n# https://discord.gg/VaTVkXB4aQ", "install": "gem install mollie-api-ruby" } ] } } } }, "components": { "securitySchemes": { "apiKey": { "type": "http", "scheme": "bearer", "x-default": "live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" }, "organizationAccessToken": { "type": "http", "scheme": "bearer", "x-default": "access_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" }, "oAuth": { "type": "oauth2", "flows": { "authorizationCode": { "authorizationUrl": "https://my.mollie.com/oauth2/authorize", "tokenUrl": "https://api.mollie.com/oauth2/tokens", "scopes": {} } } } } }, "x-readme": { "explorer-enabled": false, "samples-languages": [ "shell", "php", "node", "python", "ruby" ] } } ```