Get Payment Methods by Currency
GET
Terminal window
Returns the payment methods available to complete a transaction for a specified currency. Plain JSON — no encryption required. Use this to build a dynamic payment method picker in your own UI for the seamless flow, instead of hardcoding payment method codes.
| Environment | URL |
|---|---|
| Production | https://api.pesepay.com/api/payments-engine/v1/payment-methods/for-currency |
Headers
Section titled “Headers”| Parameter | Type | Required | Description |
|---|---|---|---|
content-type | string | Yes | Must be application/json |
Query parameters
Section titled “Query parameters”| Parameter | Type | Description |
|---|---|---|
currencyCode | string | The currency to get available payment methods for, e.g. USD |
Code examples
Section titled “Code examples”curl -G https://api.pesepay.com/api/payments-engine/v1/payment-methods/for-currency \ -H "content-type: application/json" \ --data-urlencode "currencyCode=USD"const url = new URL( 'https://api.pesepay.com/api/payments-engine/v1/payment-methods/for-currency');url.searchParams.set('currencyCode', 'USD');
const response = await fetch(url, { headers: { 'content-type': 'application/json' },});const paymentMethods = await response.json();import requests
response = requests.get( "https://api.pesepay.com/api/payments-engine/v1/payment-methods/for-currency", params={"currencyCode": "USD"}, headers={"content-type": "application/json"},)payment_methods = response.json()<?php$response = file_get_contents( 'https://api.pesepay.com/api/payments-engine/v1/payment-methods/for-currency?currencyCode=USD');$paymentMethods = json_decode($response, true);HttpClient client = HttpClient.newHttpClient();HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.pesepay.com/api/payments-engine/v1/payment-methods/for-currency?currencyCode=USD")) .header("content-type", "application/json") .GET() .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());Response
Section titled “Response”An array of Payment Method objects.