Merchant API
Retrieve a customer's payment method
api
get
/api/1.0/customers/{customer_id}/payment-methods/{payment_method_id}

Retrieve a customer's payment method

Retrieve the information of a specific payment method that is saved.

Authorization

Each Merchant API request must contain an authorization header in the following format to make a call:

'Authorization: Bearer <yourSecretApiKey>'

Before you start, ensure that you've successfully applied for a Merchant Account in your Revolut Business Account.

The Public key is on the same path in your Revolut Business account as the Secret key. There are two different functions for each:

  • Public key should be provided with payment methods at checkout
  • Secret key is used as a part of the authorization header for all server calls, e.g., creating order

Complete the following steps to generate the Production API keys (Secret, Public):

  1. Log in to your Revolut Business portal.
  2. On the top left corner, click your account name, click APIs then select Merchant API.
  3. Under the Production API Secret key and Production API Public key sections you will find the API keys needed. If it's your first time on this page, you will need to click the Generate button to create your unique API keys.

You can also use this link to directly open the Merchant API page.

Merchant API - Settings

note

Use these keys only for the production environment. For the Revolut Business Sandbox environment, use the sandbox API keys.

SSL

note

This authentication protocol is used exclusively when using Fast checkout.

Connection over HTTPS is using SSL authentication. For successful authentication, your system's certificate should be issued by a Public Certificate Authority (PCA) and your system should trust Revolut's public certificate.

Revolut-Pay-Payload-Signature

note

This authentication protocol is used exclusively when using Fast checkout.

Data integrity and authorship will be verified using a payload-based signature. The response of a successful URL registration for address validation (see: Register address validation for Fast checkout) will contain a secret signing key.

The signing key will be used by Revolut to compute a Hash-based Message Authentication Code (HMAC) payload signature whenever the registered URL is called, which should be verified by your backend.

Request

Path Parameters
Path Parameters

The ID of the Customer object.

The ID of the payment method.

Header Parameters
Header Parameters

This parameter accepts the Merchant API Secret key to authorise requests coming from the merchant's backend.

It ensures that ensures that each request is authenticated and authorised by verifying the secret key. The secret key should be included in all request headers as a Bearer token.

info

For more information, see: Authorization

Response

OK

Response body
Body object

The ID of the payment method.

Possible values: [CARD, REVOLUT_PAY]

The type of the payment method.

note

Only merchant initiated transactions are supported for saved REVOLUT_PAY payment methods.

Possible values: [CUSTOMER, MERCHANT]

Indicates in which case this saved payment method can be used for payments.

  • CUSTOMER: This payment method can be used only when the customer is on the checkout page.
  • MERCHANT: This payment method can be used without the customer being on the checkout page, and the merchant can initiate transactions, for example, to take payments for recurring transactions.

The details of the payment method.

Possible values: >= 6 characters and <= 6 characters

The BIN of the payment card.

Possible values: >= 4 characters and <= 4 characters

The last four digits of the payment card.

The expiry month of the payment card.

The expiry year of the payment card.

The name of the cardholder.

The billing address of the payment method.

Possible values: non-empty

Street line 1 information.

Possible values: non-empty

Street line 2 information.

Possible values: non-empty

The postcode associated with the address.

Possible values: non-empty

The city associated with the address.

Possible values: non-empty

The region associated with the address.

Possible values: non-empty

The country associated with the address.

Possible values: [VISA, MASTERCARD, MAESTRO]

The brand of the payment card.

Possible values: [DEBIT, CREDIT, PREPAID, DEFERRED_DEBIT, CHARGE]

The funding type of the payment card.

The issuer of the payment card.

Two-letter country code of the country where the payment card was issued.

The date and time the payment card was added.

Was this page helpful?
Loading...