{"title":"Gift cards (classic)","category":"default","creationDate":1776961627,"content":"<div class=\"sc-notice warning\"><div>\n<p><strong>Adyen is no longer developing the Classic API integration<\/strong><\/p>\n<p>This page is for the Classic API (<code>\/authorise<\/code>) integration, which we no longer accept new integrations with. <\/p>\n<p>We strongly recommend migrating to the newer <a href=\"\/payment-methods\/gift-cards\">Gift cards<\/a> integration. To use this newer integration, you must also <a href=\"\/pt\/online-payments\/upgrade-your-integration\/migrate-to-checkout-api\">migrate to the Checkout API<\/a>.<\/p>\n<\/div><\/div>\n<p>Adyen allows you to process payments for gift cards provided by <a href=\"https:\/\/www.givex.com\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Givex<\/a>, <a href=\"http:\/\/www.storedvalue.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">SVS<\/a>, and <a href=\"https:\/\/merchants.fiserv.com\/en-us\/products\/merchants\/gift-and-payroll-card-solutions\/gift-card-solutions\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Fiserv<\/a> (formerly ValueLink).<br \/>\nWe also support gift cards from key local gift card providers in several countries\/regions. You can process payments with these gift cards, but no other transactions.<\/p>\n<p>Here we explain how you can:<\/p>\n<ul>\n<li><a href=\"#make-payment\">Make a gift card payment<\/a> using the <a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/authorise\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/authorise<\/a>\u00a0endpoint.<\/li>\n<\/ul>\n<p>For <a href=\"\/pt\/payment-methods\/gift-cards\/stored-value-api\">other gift card transactions<\/a> you can use our JSON-only Stored Value API. For example, you can issue a new card, check the balance stored on a card, or deactivate a card.<\/p>\n<h2 id=\"make-payment\">Make a payment<\/h2>\n<p>To make a gift card payment:<\/p>\n<ul>\n<li>\n<p>Make a POST request to the\u00a0<a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/authorise\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/authorise<\/a>\u00a0endpoint, specifying the following parameters:<\/p>\n<ul>\n<li>\n<p><code>amount<\/code>: The <code>currency<\/code> and <code>value<\/code> (in minor units) of the transaction.<\/p>\n<div class=\"sc-notice info\"><div>\n<p>A <code>value<\/code> of <strong>0<\/strong> will return <code>additionalData.currentBalanceValue<\/code> with the remaining balance stored on the gift card.<\/p>\n<\/div><\/div>\n<\/li>\n<li>\n<p><code>card.expiryMonth<\/code>: Expiry month of the gift card.\u00a0<\/p>\n<\/li>\n<li>\n<p><code>card.expiryYear<\/code>:\u00a0Expiry year of the gift card.\u00a0<\/p>\n<\/li>\n<li>\n<p><code>card.number<\/code>: Gift card number.<\/p>\n<\/li>\n<li>\n<p><code>card.holderName<\/code>: <strong>Optional<\/strong>. Name of the shopper that the gift card belongs to.<\/p>\n<\/li>\n<li>\n<p><code>card.cvc<\/code>:\u00a0<strong>Optional<\/strong>. The PIN code or other type of security code of the gift card. Not all virtual gift cards have a PIN.<\/p>\n<\/li>\n<li>\n<p><code>reference<\/code>: Your unique reference for this payment.<\/p>\n<\/li>\n<li>\n<p><code>selectedBrand<\/code>: Brand of the gift card.<\/p>\n<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"''\" :id=\"'1910163007'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"JSON\",\"content\":\"{\\n   \\\"amount\\\":{\\n      \\\"currency\\\":\\\"GBP\\\",\\n      \\\"value\\\":1000\\n   },\\n   \\\"card\\\":{\\n      \\\"cvc\\\":\\\"1234\\\",\\n      \\\"expiryMonth\\\":\\\"10\\\",\\n      \\\"expiryYear\\\":\\\"2020\\\",\\n      \\\"holderName\\\":\\\"John Smith\\\",\\n      \\\"number\\\":\\\"6036283997595793321\\\"\\n   },\\n   \\\"reference\\\":\\\"Your Reference Here\\\",\\n   \\\"merchantAccount\\\":\\\"TestMerchant\\\",\\n   \\\"selectedBrand\\\":\\\"givex\\\"\\n}\"},{\"language\":\"xml\",\"tabTitle\":\"Soap\",\"content\":\"&lt;?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?&gt;\\n&lt;soap:Envelope xmlns:soap=\\\"http:\\\/\\\/schemas.xmlsoap.org\\\/soap\\\/envelope\\\/\\\" xmlns:xsd=\\\"http:\\\/\\\/www.w3.org\\\/2001\\\/XMLSchema\\\" xmlns:xsi=\\\"http:\\\/\\\/www.w3.org\\\/2001\\\/XMLSchema-instance\\\"&gt;\\n   &lt;soap:Body&gt;\\n      &lt;ns1:authorise xmlns:ns1=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;\\n         &lt;ns1:paymentRequest&gt;\\n            &lt;amount xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;\\n               &lt;currency xmlns=\\\"http:\\\/\\\/common.services.adyen.com\\\"&gt;GBP&lt;\\\/currency&gt;\\n               &lt;value xmlns=\\\"http:\\\/\\\/common.services.adyen.com\\\"&gt;1000&lt;\\\/value&gt;\\n            &lt;\\\/amount&gt;\\n            &lt;billingAddress xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\" xsi:nil=\\\"true\\\" \\\/&gt;\\n            &lt;card xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;\\n               &lt;billingAddress xsi:nil=\\\"true\\\" \\\/&gt;\\n               &lt;cvc&gt;1234&lt;\\\/cvc&gt;\\n               &lt;expiryMonth&gt;10&lt;\\\/expiryMonth&gt;\\n               &lt;expiryYear&gt;2020&lt;\\\/expiryYear&gt;\\n               &lt;holderName&gt;John Smith&lt;\\\/holderName&gt;\\n               &lt;issueNumber xsi:nil=\\\"true\\\" \\\/&gt;\\n               &lt;number&gt;6036283997595793321&lt;\\\/number&gt;\\n               &lt;startMonth xsi:nil=\\\"true\\\" \\\/&gt;\\n               &lt;startYear xsi:nil=\\\"true\\\" \\\/&gt;\\n            &lt;\\\/card&gt;\\n            &lt;reference xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;Your Reference Here&lt;\\\/reference&gt;\\n            &lt;merchantAccount xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;TestMerchant&lt;\\\/merchantAccount&gt;\\n            &lt;merchantOrderReference xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\" xsi:nil=\\\"true\\\" \\\/&gt;\\n            &lt;selectedBrand xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;givex&lt;\\\/selectedBrand&gt;\\n         &lt;\\\/ns1:paymentRequest&gt;\\n      &lt;\\\/ns1:authorise&gt;\\n   &lt;\\\/soap:Body&gt;\\n&lt;\\\/soap:Envelope&gt;\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ul>\n<h4 id=\"response\">Response<\/h4>\n<p>You receive a response containing:<\/p>\n<ul>\n<li><code>resultCode<\/code>: Use this to present the payment result to the shopper.<\/li>\n<li><code>pspReference<\/code>: Our unique reference for the payment.<\/li>\n<li><code>authCode<\/code>: When the payment is authorised successfully, this field holds the authorisation code for the payment. When the payment is not authorised, this field is empty.<\/li>\n<\/ul>\n<pre><code class=\"language-json\">{\n  \"pspReference\": \"8814689190961342\",\n  \"resultCode\": \"Authorised\",\n  \"authCode\": \"83152\"\n}<\/code><\/pre>\n<p>For other possible response codes and fields of the payment response, refer to the <code>\/authorise<\/code> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/v50\/authorise__section_resParams\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">response parameters<\/a>.<\/p>\n<h2>Next steps<\/h2>\n<div class=\"next-steps\" id=\"next-steps\" >\n<a href=\"\/payment-methods\/gift-cards\/stored-value-api\" class=\"next-steps__step\" style=\"width:45%;\" target=\"_self\"><div class=\"next-steps__label\">required<\/div><p class=\"next-steps__body\"><div style=\"text-align: center;\"><h6 class=\"next-steps__title\">Manage gift cards<\/h6><p>Learn about other gift card transactions.<\/p><\/div><\/p><\/a><a href=\"\/payment-methods\/gift-cards\/stored-value-api\/check-balance\" class=\"next-steps__step\" style=\"width:45%;\" target=\"_self\"><p class=\"next-steps__body\"><div style=\"text-align: center;\"><h6 class=\"next-steps__title\">Check balance<\/h6><p>Check the value stored on a gift card.<\/p><\/div><\/p><\/a><\/div>\n\n<h2 id=\"see-also\">See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"\/payment-methods\"\n                        target=\"_self\"\n                        >\n                    Payment methods\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/classic-api-integration\/classic-gift-cards","articleFields":{"description":"Add gift card payments to an existing API-only integration.","feedback_component":true,"parameters":{"anchor_new":"<a href=\"\/payment-methods\/gift-cards\">Gift cards<\/a>","parent_page":"Classic API (<code>\/authorise<\/code>)","new_desc":"integrating using our Checkout APIs"},"sitemap":{"priority":0.3},"id":"27529907","type":"page","_expandable":{"operations":""},"status":"current","last_edit_on":"07-05-2021 13:00"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/classic-api-integration\/classic-gift-cards","title":"Gift cards (classic)","content":"\nAdyen is no longer developing the Classic API integration\nThis page is for the Classic API (\/authorise) integration, which we no longer accept new integrations with. \nWe strongly recommend migrating to the newer Gift cards integration. To use this newer integration, you must also migrate to the Checkout API.\n\nAdyen allows you to process payments for gift cards provided by Givex, SVS, and Fiserv (formerly ValueLink).\nWe also support gift cards from key local gift card providers in several countries\/regions. You can process payments with these gift cards, but no other transactions.\nHere we explain how you can:\n\nMake a gift card payment using the \/authorise\u00a0endpoint.\n\nFor other gift card transactions you can use our JSON-only Stored Value API. For example, you can issue a new card, check the balance stored on a card, or deactivate a card.\nMake a payment\nTo make a gift card payment:\n\n\nMake a POST request to the\u00a0\/authorise\u00a0endpoint, specifying the following parameters:\n\n\namount: The currency and value (in minor units) of the transaction.\n\nA value of 0 will return additionalData.currentBalanceValue with the remaining balance stored on the gift card.\n\n\n\ncard.expiryMonth: Expiry month of the gift card.\u00a0\n\n\ncard.expiryYear:\u00a0Expiry year of the gift card.\u00a0\n\n\ncard.number: Gift card number.\n\n\ncard.holderName: Optional. Name of the shopper that the gift card belongs to.\n\n\ncard.cvc:\u00a0Optional. The PIN code or other type of security code of the gift card. Not all virtual gift cards have a PIN.\n\n\nreference: Your unique reference for this payment.\n\n\nselectedBrand: Brand of the gift card.\n\n\n\n\n\n\n\nResponse\nYou receive a response containing:\n\nresultCode: Use this to present the payment result to the shopper.\npspReference: Our unique reference for the payment.\nauthCode: When the payment is authorised successfully, this field holds the authorisation code for the payment. When the payment is not authorised, this field is empty.\n\n{\n  \"pspReference\": \"8814689190961342\",\n  \"resultCode\": \"Authorised\",\n  \"authCode\": \"83152\"\n}\nFor other possible response codes and fields of the payment response, refer to the \/authorise response parameters.\nNext steps\n\nrequiredManage gift cardsLearn about other gift card transactions.Check balanceCheck the value stored on a gift card.\n\nSee also\n\n\n                    Payment methods\n                \n","type":"page","locale":"pt","boost":16,"hierarchy":{"lvl0":"Home","lvl1":"Online payments","lvl2":"Classic integrations for Ecommerce","lvl3":"Classic API integration","lvl4":"Gift cards (classic)"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/online-payments","lvl2":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations","lvl3":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/classic-api-integration","lvl4":"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/classic-gift-cards"},"levels":5,"category":"Online Payments","category_color":"green","tags":["cards","(classic)"]},"articleFiles":{"1910163007.json":"<p alt=\"\">1910163007.json<\/p>"}}
