Skip to main content
POST
/
payments
/
v1
/
checkouts
Generate A Payment Checkout URL
curl --request POST \
  --url https://sandbox-api.payfonte.com/payments/v1/checkouts \
  --header 'Content-Type: application/json' \
  --header 'client-id: <api-key>' \
  --header 'client-secret: <api-key>' \
  --data '{
  "country": "US, NG, CI, SN, CA, UK",
  "currency": "USD, NGN, XOF, XAF",
  "amount": 100000,
  "user": {
    "name": "Example User",
    "email": "user@example.com",
    "phoneNumber": "2347012345678"
  },
  "reference": "<string>",
  "redirectURL": "https://example.com/redirect/success",
  "cancelURL": "https://example.com/redirect/cancel",
  "webhook": "https://example.com/webhook"
}'
{
  "data": {
    "url": "https://checkout-staging.payfonte.com/payfusion/66579afe04916ddcfcf73e7b",
    "shortURL": "https://l.6bd.co/XXXXX",
    "reference": "<string>",
    "amount": 100000,
    "currency": "USD, NGN, XOF, XAF"
  }
}

Authorizations

client-id
string
header
required
client-secret
string
header
required

Body

application/json

Generate A Payment Checkout URL

country
string
required

2 character country code

Examples:

"NG"

"US"

"CI"

"SN"

"CA"

"UK"

currency
string
required

This is the base currency to be charged in.

Examples:

"NGN"

"USD"

"XOF"

"XAF"

amount
integer
required

This is the amount to charge the customer. Amount should be sent in the lowest denomination e.g for 100 USD you should send 100 * 100 = 10000

Examples:

100000

user
object
required
reference
string

A reference code you'll generate to identify this transaction. This must be unique for every transaction. If you don't pass one, we will generate one for you.

redirectURL
string<uri>

Fully qualified URL to which the customer should be redirected after the payment is completed

Examples:

"https://example.com/redirect/success"

cancelURL
string<uri>

Fully qualified URL to which the customer should be redirected if the cancel the payment session

Examples:

"https://example.com/redirect/cancel"

webhook
string<uri>

This is a URL, if this is passed we will send the event webhook payload to this endpoint. Use this to override the webhook url provided on the dashboard for this transaction. Read more on Webhooks

Examples:

"https://example.com/webhook"

Response

201 - application/json

Checkout URL Successfully Generated

data
object
I