List payment methods
GEThttps://api.nogorpay.com/api/v1/charge/methods
Returns the payment gateways that are active for a brand. Use it to show your own payment buttons, then pass the chosen provider as payment_method when you create a charge so the customer skips the method selection screen.
Query parameters
Section titled “Query parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
brand_id |
string | No | The 6-character brand ID from your dashboard, for example B9X7K2. If you leave it out, NogorPay uses your default brand. |
Request
Section titled “Request”curl "https://api.nogorpay.com/api/v1/charge/methods?brand_id=B9X7K2" \ -H "NOGORPAY-API-KEY: $NOGORPAY_API_KEY"const url = new URL('https://api.nogorpay.com/api/v1/charge/methods');url.searchParams.set('brand_id', 'B9X7K2');
const res = await fetch(url, { headers: { 'NOGORPAY-API-KEY': process.env.NOGORPAY_API_KEY },});const { methods } = await res.json();<?php$ch = curl_init('https://api.nogorpay.com/api/v1/charge/methods?brand_id=B9X7K2');curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ['NOGORPAY-API-KEY: ' . getenv('NOGORPAY_API_KEY')],]);$methods = json_decode(curl_exec($ch), true)['methods'] ?? [];curl_close($ch);import osimport requests
res = requests.get( "https://api.nogorpay.com/api/v1/charge/methods", params={"brand_id": "B9X7K2"}, headers={"NOGORPAY-API-KEY": os.environ["NOGORPAY_API_KEY"]},)methods = res.json()["methods"]Response
Section titled “Response”{ "success": true, "brand": { "brand_id": "B9X7K2", "name": "Dhaka Tech Store", "logo": null, "is_default": true }, "methods": [ { "id": "bkash_personal", "name": "bKash Personal", "provider": "bkash", "gateway_type": "manual", "type": "mfs", "logo": "https://media.nogorpay.com/gateways/bkash.png", "min_amount": 10, "max_amount": 25000, "fee": { "enable": false, "type": "percentage", "value": 0 } }, { "id": "nagad_merchant", "name": "Nagad Merchant", "provider": "nagad", "gateway_type": "manual", "type": "mfs", "logo": "https://media.nogorpay.com/gateways/nagad.png", "min_amount": 10, "max_amount": 25000, "fee": { "enable": true, "type": "percentage", "value": 1.5 } } ]}Response fields
Section titled “Response fields”| Field | Type | Description |
|---|---|---|
success |
boolean | true when the request succeeded. |
brand |
object or null |
The brand the methods belong to. null if your account has no brand yet. |
brand.brand_id |
string | The brand’s 6-character ID. |
brand.name |
string | The brand’s display name. |
brand.logo |
string or null |
URL of the brand logo. |
brand.is_default |
boolean | true if this is your default brand. |
methods |
array | Active gateways, in the order you added them. Empty if none are active. |
methods[].id |
string | Method ID, made from the provider and account type, for example bkash_personal, bkash_agent, nagad_merchant. |
methods[].name |
string | Display name you gave the gateway. |
methods[].provider |
string | Provider code: bkash, nagad, rocket or upay. Pass this as payment_method when you create a charge. |
methods[].gateway_type |
string | manual (confirmed by SMS from your paired phone) or direct_api (confirmed by the provider API). |
methods[].type |
string | Always mfs (mobile financial service). |
methods[].logo |
string or null |
URL of the gateway logo. |
methods[].min_amount |
number or null |
Smallest amount this gateway accepts, in BDT. null means no minimum. |
methods[].max_amount |
number or null |
Largest amount this gateway accepts, in BDT. null means no maximum. |
methods[].fee.enable |
boolean | Whether a gateway fee is configured. |
methods[].fee.type |
string | percentage or fixed. |
methods[].fee.value |
number | Percentage (for percentage) or BDT amount (for fixed). |
Errors
Section titled “Errors”| Status | message |
Cause |
|---|---|---|
401 |
Invalid API Key provided |
See Authentication. |
404 |
Brand with identifier 'B9X7K2' was not found for this merchant account. |
The brand_id doesn’t belong to your account. |
