{"_id":"5c6ef8d4a02fb90034671bd3","project":"57336fd5a6a9c40e00e13a0b","version":{"_id":"5c6c245bc0d91f0185a7409c","project":"57336fd5a6a9c40e00e13a0b","__v":1,"forked_from":"5bdc633c15437b0042ed963c","createdAt":"2018-04-23T15:17:35.680Z","releaseDate":"2018-04-23T15:17:35.680Z","categories":["5c6c245bc0d91f0185a74053","5c6c245bc0d91f0185a74054","5c6c245bc0d91f0185a74055","5c6c245bc0d91f0185a74056","5c6c245bc0d91f0185a74057","5c6c245bc0d91f0185a74058","5c6c245bc0d91f0185a74059","5c6c245bc0d91f0185a7405a","5c6c245bc0d91f0185a7405b","5c6c245bc0d91f0185a7405c","5c6c245bc0d91f0185a7405d","5c6c245bc0d91f0185a7405e","5b34c737e0dca2000311de6a","5c6c245bc0d91f0185a7405f","5c6ef8b34dc2750041240076"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"Main","version_clean":"8976.0.0-Tools","version":"8976-Tools"},"category":{"_id":"5c6ef8b34dc2750041240076","project":"57336fd5a6a9c40e00e13a0b","version":"5c6c245bc0d91f0185a7409c","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2019-02-21T19:14:59.579Z","from_sync":false,"order":10,"slug":"retrieve-payment-methods","title":"Retrieve Payment Methods"},"user":"5beb1b96bc2003003ecd645e","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-02-21T19:15:32.637Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[{"code":"","language":"text"}]},"method":"post","examples":{"codes":[]},"auth":"optional","params":[],"url":""},"isReference":false,"order":0,"body":"##Definition\nhttps<span>://sandbox.bluesnap.com/services/2/tools/payment-methods-info\n<hr>\n\n##Documentation\nWith this request, you retrieve to retrieve the payment methods available to the shopper based on the following:\n * Shopper country\n * Shopper currency\n * Activated payment methods in the merchant account console\n\n##Request Content\nSend a POST request to:\n * Sandbox: https://sandbox.bluesnap.com/services/2/tools/payment-methods-info\n * Production: https://ws.bluesnap.com/services/2/tools/payment-methods-info \n\nwith the following properties:\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`country`\",\n    \"0-1\": \"*string*\",\n    \"0-2\": \"Yes\",\n    \"h-0\": \"Property\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Required\",\n    \"h-3\": \"Description\",\n    \"0-3\": \"Shopper's country\",\n    \"1-0\": \"`currency`\",\n    \"1-1\": \"*string*\",\n    \"1-2\": \"Yes\",\n    \"1-3\": \"Shopper's currency, using the [supported currency codes](https://support.bluesnap.com/docs/currencies)\"\n  },\n  \"cols\": 4,\n  \"rows\": 2\n}\n[/block]\n##Errors\nIf the request fails, the API returns an HTTP 400 response, with the following information:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Code\",\n    \"h-1\": \"Name\",\n    \"h-2\": \"Error Description\",\n    \"0-0\": \"22020\",\n    \"0-1\": \"NO_PAYMENT_METHODS\",\n    \"0-2\": \"There are no payment methods available for this shopper.\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n##Response Content\nIf successful, the response HTTP status code is 200 OK.\nThe response includes the `supportedPaymentMethods` or `supported-payment-method` object, with the following properties:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"`paymentMethodCodeName`\\n`payment-method-code-name`\",\n    \"1-0\": \"`paymentMethodDisplayName`\\n`payment-method-display-name`\",\n    \"2-0\": \"`supportedTypes`\\n`supported-type`\",\n    \"1-2\": \"Payment method full name, such as:\\n * `Credit Card`\\n * `Wire Transfer`\\n * `Electronic Check Presentment`\\n * `SEPA Direct Debit`\",\n    \"0-2\": \"Payment method short name, such as:\\n * `CC`\\n * `WIRE`\\n * `ECP`\\n * `SEPA_DIRECT_DEBIT`\",\n    \"0-1\": \"*String*\",\n    \"1-1\": \"*String*\",\n    \"2-1\": \"*String*\",\n    \"2-2\": \"This is only included if there is more than one type for a payment method. For example, `Credit Card` could include:\\n * `VISA`\\n * `MASTERCARD`\\n * `AMEX`\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<ul class=\\\"nav nav-pills nav-justified\\\">\\n  <li class=\\\"active\\\"><a data-toggle=\\\"pill\\\" href=\\\"#menujson\\\">JSON Examples</a></li>\\n  <li><a data-toggle=\\\"tab\\\" href=\\\"#menuxml\\\">XML Examples</a></li>\\n</ul>\\n<div class=\\\"tab-content\\\">\\n  <div id=\\\"menujson\\\" class=\\\"tab-pane fade in active\\\">\"\n}\n[/block]\n##JSON Examples\n###Request Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/tools/payment-methods-info \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n   \\\"country\\\": \\\"FR\\\",\\n   \\\"currency\\\": \\\"EUR\\\"\\n}'\",\n      \"language\": \"curl\",\n      \"name\": \"Retrieve Payment Methods\"\n    }\n  ]\n}\n[/block]\n###Response Example \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"country\\\": \\\"FR\\\",\\n    \\\"currency\\\": \\\"EUR\\\",\\n    \\\"supportedPaymentMethods\\\": [\\n        {\\n            \\\"paymentMethodCodeName\\\": \\\"WALLET_MP\\\",\\n            \\\"paymentMethodDisplayName\\\": \\\"Wallet MP\\\"\\n        },\\n        {\\n            \\\"paymentMethodCodeName\\\": \\\"CC\\\",\\n            \\\"paymentMethodDisplayName\\\": \\\"Credit Card\\\",\\n            \\\"supportedTypes\\\": [\\n                \\\"VISA\\\",\\n                \\\"MASTERCARD\\\"\\n            ]\\n        },\\n        {\\n            \\\"paymentMethodCodeName\\\": \\\"PAYPAL\\\",\\n            \\\"paymentMethodDisplayName\\\": \\\"PayPal\\\"\\n        },\\n        {\\n            \\\"paymentMethodCodeName\\\": \\\"WIRE\\\",\\n            \\\"paymentMethodDisplayName\\\": \\\"Wire Transfer\\\"\\n        },\\n        {\\n            \\\"paymentMethodCodeName\\\": \\\"MONEYBOOKERS\\\",\\n            \\\"paymentMethodDisplayName\\\": \\\"Moneybookers\\\"\\n        },\\n        {\\n            \\\"paymentMethodCodeName\\\": \\\"SEPA_DIRECT_DEBIT\\\",\\n            \\\"paymentMethodDisplayName\\\": \\\"SEPA Direct Debit\\\"\\n        },\\n        {\\n            \\\"paymentMethodCodeName\\\": \\\"BANKTRANSFER\\\",\\n            \\\"paymentMethodDisplayName\\\": \\\"Bank Transfer\\\"\\n        },\\n        {\\n            \\\"paymentMethodCodeName\\\": \\\"SOFORTUBERWEISUNG\\\"\\n        }\\n    ]\\n}\\n\",\n      \"language\": \"json\",\n      \"name\": \"Retrieve Payment Methods Response: 200 OK\"\n    }\n  ]\n}\n[/block]\n##Example Description\nThe example above shows a Retrieve Payment Methods request for a shopper in France with EUR as their currency, and a response showing the available payment types of:\n\n * Wallet:  Wallet MP (Masterpass)\n * Credit card: Visa and Mastercard\n * Paypal\n * Wire Transfer\n * Money Bookers\n * SEPA Direct Debit\n * Bank Transfer\n * SOFORT\n[block:html]\n{\n  \"html\": \" </div>\\n <div id=\\\"menuxml\\\" class=\\\"tab-pane fade\\\">\"\n}\n[/block]\n##XML Examples\n###Request Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/tools/payment-methods-info \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<payment-methods-info xmlns=\\\"http://ws.plimus.com\\\">\\n  <country>US</country>\\n  <currency>USD</currency>\\n</payment-methods-info>\",\n      \"language\": \"curl\",\n      \"name\": \"Retrieve Payment Methods\"\n    }\n  ]\n}\n[/block]\n###Response Example \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n<payment-methods-info xmlns=\\\"http://ws.plimus.com\\\">\\n    <country>US</country>\\n    <currency>USD</currency>\\n    <supported-payment-method>\\n        <payment-method-code-name>WALLET_MP</payment-method-code-name>\\n        <payment-method-display-name>Wallet MP</payment-method-display-name>\\n    </supported-payment-method>\\n    <supported-payment-method>\\n        <payment-method-code-name>CC</payment-method-code-name>\\n        <payment-method-display-name>Credit Card</payment-method-display-name>\\n        <supported-type>VISA</supported-type>\\n        <supported-type>MASTERCARD</supported-type>\\n    </supported-payment-method>\\n    <supported-payment-method>\\n        <payment-method-code-name>PAYPAL</payment-method-code-name>\\n        <payment-method-display-name>PayPal</payment-method-display-name>\\n    </supported-payment-method>\\n    <supported-payment-method>\\n        <payment-method-code-name>WIRE</payment-method-code-name>\\n        <payment-method-display-name>Wire Transfer</payment-method-display-name>\\n    </supported-payment-method>\\n    <supported-payment-method>\\n        <payment-method-code-name>ECP</payment-method-code-name>\\n        <payment-method-display-name>Electronic Check Presentment</payment-method-display-name>\\n    </supported-payment-method>\\n    <supported-payment-method>\\n        <payment-method-code-name>MONEYBOOKERS</payment-method-code-name>\\n        <payment-method-display-name>Moneybookers</payment-method-display-name>\\n    </supported-payment-method>\\n    <supported-payment-method>\\n        <payment-method-code-name>BANKTRANSFER</payment-method-code-name>\\n        <payment-method-display-name>Bank Transfer</payment-method-display-name>\\n    </supported-payment-method>\\n</payment-methods-info>\",\n      \"language\": \"xml\",\n      \"name\": \"Retrieve Payment Methods Response: 200 OK\"\n    }\n  ]\n}\n[/block]\n##Example Description\nThe example above shows a Retrieve Payment Methods request for a shopper in the US with USD as their currency, and a response showing the available payment types of:\n\n * Wallet:  Wallet MP (Masterpass)\n * Credit card: Visa and Mastercard\n * Paypal\n * Wire Transfer\n * ECP\n * Money Bookers\n * Bank Transfer\n\n[block:html]\n{\n  \"html\": \" </div>\\n</div>\"\n}\n[/block]\n\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>","excerpt":"","slug":"retrieve-payment-methods","type":"endpoint","title":"Retrieve Payment Methods"}

postRetrieve Payment Methods


Definition

https://sandbox.bluesnap.com/services/2/tools/payment-methods-info


Documentation

With this request, you retrieve to retrieve the payment methods available to the shopper based on the following:

  • Shopper country
  • Shopper currency
  • Activated payment methods in the merchant account console

Request Content

Send a POST request to:

with the following properties:

Property
Type
Required
Description

country

string

Yes

Shopper's country

currency

string

Yes

Shopper's currency, using the supported currency codes

Errors

If the request fails, the API returns an HTTP 400 response, with the following information:

Code
Name
Error Description

22020

NO_PAYMENT_METHODS

There are no payment methods available for this shopper.

Response Content

If successful, the response HTTP status code is 200 OK.
The response includes the supportedPaymentMethods or supported-payment-method object, with the following properties:

Property
Type
Description

paymentMethodCodeName
payment-method-code-name

String

Payment method short name, such as:

  • CC
  • WIRE
  • ECP
  • SEPA_DIRECT_DEBIT

paymentMethodDisplayName
payment-method-display-name

String

Payment method full name, such as:

  • Credit Card
  • Wire Transfer
  • Electronic Check Presentment
  • SEPA Direct Debit

supportedTypes
supported-type

String

This is only included if there is more than one type for a payment method. For example, Credit Card could include:

  • VISA
  • MASTERCARD
  • AMEX