# Payment Method + Get Process Token

***

### Description:

This endpoint facilitates the retrieval of a token and associated payment methods. It primarily aids in obtaining user-specific payment details and serves as an essential interface between the system and third-party payment processors.

**Mode:**

`POST`

#### Node:

```bash
/third-party-service/payment-method
```

#### Sample Access Token:

`eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IkB0cmluaWFndWlycmUiLCJzdWIiOjI5NywiaWF0IjoxNjkzMzg3NzkzfQ.8bLmcjHDI4xGqSx9rqTdvfevhTud2S6WHO8C01DRllo`

<mark style="color:green;">`POST`</mark> `/third-party-service/payment-method`

Get Token & payment method of the user

#### Headers

| Name                                            | Type                                                                                                                                                        | Description                                                    |
| ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| API-Key<mark style="color:red;">\*</mark>       | String                                                                                                                                                      | Your API key for authentication.                               |
| API-Secret<mark style="color:red;">\*</mark>    | String                                                                                                                                                      | Your API secret for enhanced security.                         |
| Authorization<mark style="color:red;">\*</mark> | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IkB0cmluaWFndWlycmUiLCJzdWIiOjI5NywiaWF0IjoxNjkzMzg3NzkzfQ.8bLmcjHDI4xGqSx9rqTdvfevhTud2S6WHO8C01DRllo | Access token obtained from the KYC Lite process. Example token |

#### Request Body

| Name                                                     | Type                                                     | Description                                   |
| -------------------------------------------------------- | -------------------------------------------------------- | --------------------------------------------- |
| "country"<mark style="color:red;">\*</mark>              | "USA"                                                    | <p>ISO format</p><p><br></p>                  |
| "address"<mark style="color:red;">\*</mark>              | "USA, Florida, Miami, El Doral"                          |                                               |
| "fullname"<mark style="color:red;">\*</mark>             | "Peter Cetera"                                           |                                               |
| "email"<mark style="color:red;">\*</mark>                | "<peter@gmail.com>"                                      |                                               |
| "phonenumber"<mark style="color:red;">\*</mark>          | "+1789654890"                                            |                                               |
| "initial\_transaction"<mark style="color:red;">\*</mark> | "7968052d-2c60-4d18-b7d0-a850081547b8",   //uid - myinfo |                                               |
| "countrywithdraw"<mark style="color:red;">\*</mark>      | "ARG"                                                    | ISO Format, it also can be to use to deposit. |
| "city"<mark style="color:red;">\*</mark>                 | "Miami"                                                  |                                               |

{% tabs %}
{% tab title="202: Accepted " %}

<pre class="language-json"><code class="lang-json">// 
{
  "statusCode": 202,
  "message": "thrid party login and payment methods",
  "data": {
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IkBndWlsbGVybW8uc2FuY2hleiIsInN1YiI6OSwiaWF0IjoxNjg4NTAzMzg4fQ.oyH_3PN6URj7r-HBEPuipVhatOsjeF0DIc5T_O3waFs",
    "kyc": false,
    "userBanks": [
      {
        "id": 6,
        "bankName": "BANCO",
        "bankNumber": "24523458788543",
        "bankAccountOwner": "Peter Cetera",
        "icon": null,
        "countryCode": "ARG",
        "DNI": "56",
      }
    ],
    "paymentsMethods": {
      "ATM": [
        {
          "id": 4,
          "name": "ATM",
          "img": "https://alfred-pay-images.s3.amazonaws.com/profile/6573a827-0271-4217-98b2-ksdhkhgdsifuy.png"
        }
      ],
      "BANK": [
        {
          "id": 4,
          "name": "Cro",
          "img": "https://alfred-pay-images.s3.amazonaws.com/profile/6573a827-0271-4217-9lsdfkhdksjg0e6d62.png",
           ages.s3.amazonaws.com/profile/1iudfh7-7813-47e2-9e35-791b4a92994d.png",
         “ to_deposit” :  [{
                                  “account”: “21346739652098762”,
<strong>                                  “owner”: “SMC”,
</strong>                                  “Id”: “J12445689”,
                                  “bank”:”Banco”},
                                  {
                                  “account”: “76549626620985291”,
                                  “owner”: “SMC”,
                                  “Id”: “J12445689”,
<strong>                                  “bank”:”Banco”}]
</strong>        }
      ],
      "Retail": []
    },
    "exhangeFactor": {
      "id": "49037ded-7fbd-4dc5-9b49-aeedcaf8d82b",
      "to": {
        "from_currency": "BTC",
        "to_currency": "ARS",
        "rate": "7.19"
      },
      "from": {
        "from_currency": "ARS",
        "to_currency": "BTC",
        "rate": 0.139
      }
    }
  }
}
</code></pre>

{% endtab %}
{% endtabs %}

#### Considerations:

Three methods of payment: Bank, Retail, ATM

If any method is left blank in the endpoint response this means that payment method is not available.&#x20;

The Access token is obtained from KYC Lite URL (UUID), you must use that token in order to complete your requested transaction.

If the data, `Bank` of the user is null, then you must execute `/third-party-service/update-bank`.&#x20;

If “ to\_deposit” shows bank data this means the institution has the ability to perform "Pay-In" ramp transactions.&#x20;

Specific Information regarding KYC Documents by country can be found [here](/alfred-integration-docs/welcome/alfred-overview/required-documents-for-kyc-by-country.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://alfred.gitbook.io/alfred-integration-docs/penny-api-general-integration/penny-api-operations/payment-method-+-get-process-token.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
