# Payment with Token

Once a successful payment has been made using the **Payment Advice** endpoint and setting the `shouldTokenizeCard`  value to **true**, you can use the token generated for subsequent transactions.

* **Method: POST**
* **Endpoint:** [**https://api.pelpay.ng/Payment/token**](https://api.pelpay.ng/Payment/token)

<table><thead><tr><th width="232">Parameter</th><th width="111">Datatype</th><th width="103">Required</th><th>Description</th></tr></thead><tbody><tr><td>amount</td><td>Number</td><td>Yes</td><td>Amount to be debited from merchant.</td></tr><tr><td>currency</td><td>String</td><td>Yes</td><td>The currency code eg NGN.</td></tr><tr><td>merchantRef</td><td>String</td><td>Yes</td><td>The merchant ref is unique ref assigned to the merchant after registration on Pelpay</td></tr><tr><td>narration</td><td>String</td><td>Yes</td><td>Reason for the transaction.</td></tr><tr><td>callBackUrl</td><td>String</td><td>Yes</td><td>This is the merchant specified destination link after Pelpay has processed payment.</td></tr><tr><td>splitCode</td><td>String</td><td>No</td><td>This is the code generated by the merchant from Pelpay portal on the process of sharing payments to various accounts as specified by merchant.</td></tr><tr><td>shouldTokenizeCard</td><td>String</td><td>Yes</td><td>At default is false. When checked to true the system generates a code for recurrent payment.</td></tr><tr><td>customerId</td><td>String</td><td>Yes</td><td>The paying customer's ID.</td></tr><tr><td>customerLastName</td><td>String</td><td>Yes</td><td>The paying customer's last name.</td></tr><tr><td>customerFirstName</td><td>String</td><td>Yes</td><td>The paying customer's first name.</td></tr><tr><td>customerEmail</td><td>String</td><td>Yes</td><td>The paying customer's email address.</td></tr><tr><td>customerPhoneNumber</td><td>String</td><td>Yes</td><td>The paying customer's phone number.</td></tr><tr><td>customerAddress</td><td>String</td><td>Yes</td><td>The paying customer's address.</td></tr><tr><td>customerCity</td><td>String</td><td>Yes</td><td>The  paying customer's city.</td></tr><tr><td>customerStateCode</td><td>String</td><td>Yes</td><td>The paying customer's state code.</td></tr><tr><td>customerPostalCode</td><td>String</td><td>Yes</td><td>Paying customer's postal code.</td></tr><tr><td>customerCountryCode</td><td>String</td><td>Yes</td><td>Paying customer's country code.</td></tr><tr><td>integrationKey</td><td>String</td><td>Yes</td><td>This one the credentials provided to customer after registration</td></tr><tr><td>notificationUrl</td><td>String</td><td>Yes</td><td>This is the call back URL.</td></tr><tr><td>token</td><td>String</td><td>Yes</td><td>The generated token to be used for recurrent payments.</td></tr></tbody></table>

**Request Body:**&#x20;

```javascript
{
  "amount": 0,
  "currency": "str",
  "merchantRef": "string",
  "narration": "string",
  "callBackUrl": "string",
  "splitCode": "string",
  "shouldTokenizeCard": true,
  "customer": {
    "customerId": "string",
    "customerLastName": "string",
    "customerFirstName": "string",
    "customerEmail": "string",
    "customerPhoneNumber": "string",
    "customerAddress": "string",
    "customerCity": "string",
    "customerStateCode": "string",
    "customerPostalCode": "string",
    "customerCountryCode": "string"
  },
  "integrationKey": "string",
  "mcc": 0,
  "merchantDescriptor": "string",
  "notificationUrl": "string",
  "token": "string"
}
```


---

# 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://docs.pelpay.ng/payment-with-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.
