Skip to main content

API Keys

Retrieve or create yur API Key from the dashboard. Learn more about it here.

Create a payment

Use this simple payment intent payload to create a payment for any arbitrary amount.Example payload used; metadata can be changed (or removed) to any key-value items of your choice.
POST https://api.bitgpt.xyz/invoices

{
  customer_email: "[email protected]",
  items: [
    {
      type: "PAYMENT_INTENT",
      currency: "GBP",
      price: "10"
    }
  ],
  metadata: {
    any_custom_key_1: "any_custom_value_1",
    any_custom_key_2: "any_custom_value_2"
  }
}
cURL
curl -X POST https://api.bitgpt.xyz/invoices \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_email": "[email protected]",
    "items": [
      {
        "type": "PAYMENT_INTENT",
        "currency": "GBP",
        "price": "10"
      }
    ],
    "metadata": {
      "any_custom_key_1": "any_custom_value_1",
      "any_custom_key_2": "any_custom_value_2"
    }
  }'

Redirect to checkout

Redirect the customer to https://pay.bitgpt.xyz/{response.data.id}
The invoice id at response.data.id will look like this: invoice_0197c626-8ab2-7ab6-8a20-78ae53a606d3