> For the complete documentation index, see [llms.txt](https://developer.convergegate.com/legacy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.convergegate.com/legacy/wallet-api/charges/create-a-charge.md).

# Create a charge

## Arguments

| Parameter                | Type    | Required | Description                                                                                                                                                       |
| ------------------------ | ------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| source                   | string  | true     | Voucher secret PIN                                                                                                                                                |
| payer\[id]               | string  | true     | The customer’s id in your website.                                                                                                                                |
| payer\[firstname]        | string  | false    | The customer’s firstname.                                                                                                                                         |
| payer\[lastname]         | string  | false    | The customer’s lastname.                                                                                                                                          |
| payer\[email]            | string  | false    | The customer’s email.                                                                                                                                             |
| payer\[phone]            | string  | false    | The customer’s phone number.                                                                                                                                      |
| payer\[address\_city]    | string  | false    | The customer’s city.                                                                                                                                              |
| payer\[address\_country] | string  | false    | The customer’s country (Two-letter ISO code representing the country).                                                                                            |
| payer\[address\_line1]   | string  | false    | The customer’s address line1.                                                                                                                                     |
| payer\[address\_line2]   | string  | false    | The customer’s address line2.                                                                                                                                     |
| payer\[address\_state]   | string  | false    | The customer’s state.                                                                                                                                             |
| payer\[address\_zip]     | string  | false    | The customer’s zip.                                                                                                                                               |
| payer\[ip]               | string  | false    | The customer’s ip address.                                                                                                                                        |
| amount                   | integer | false    | A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency. |
| currency                 | string  | false    | Three-letter ISO currency code (ISO-4217). Must be a sent if amount is present.                                                                                   |
| metadata                 | hash    | false    | A set of key-value pairs that you can attach to a charge object. It can be useful for storing additional information about the charge in a structured format.     |

<mark style="color:green;">`POST`</mark> `https://{domain given}/v2/charges`

{% tabs %}
{% tab title="CURL" %}

```
curl https://{domain given}/v2/charges \
  -u sk_test_BQokikJOvBiI2HlWgH4olfQ2: \
  -d source=KLVGBEFEBPZ7B4QW
  -d payer[ip]=127.0.0.1 \
  -d payer[id]=123 \
  -d payer[firstname]=John \
  -d payer[lastname]=Doe \
  -d payer[email]=john@example.com \
  -d payer[address_city]="Mannheim Neckarstadt" \
  -d payer[address_country]=DE \
  -d payer[address_line1]="Scharnweberstrasse 24" \
  -d payer[address_line2]= \
  -d payer[address_state]=BW \
  -d payer[address_zip]=68-167 \
  -d payer[phone]=+49062111272935 \
  -x POST
```

{% endtab %}
{% endtabs %}

The above command returns JSON structured like this:

```json
{
	"id": "AWT_fCCMh9GTrU2CKeaeXw==",
	"amount": 1000,
	"currency": "USD",
	"payer": {
		"id": "123",
		"firstname": "John",
		"lastname": "Doe",
		"email": "john@example.com",
		"ip": "127.0.0.1",
		"address_city": "Mannheim Neckarstadt",
		"address_country": "DE",
		"address_line1": "Scharnweberstrasse 24",
		"address_line2": "",
		"address_zip": "68167",
		"address_state": "BW",
		"phone": "+49062111272935"
	},
	"source": "01CKZQR849A9MM529MF5HCG8RN",
	"status": "succeeded",
	"livemode": false
}
```
