Ginger Payments

Payment links

Get paid without a webshop by sending your customers a link to the Ginger Payments hosted payment page.

A payment link is a URL you send to your customer, for example in an email, chat message or invoice. The link opens the hosted payment page, where your customer selects a payment method and pays.

Your customer can use the same link again after a failed attempt, until the payment succeeds or the link expires.

Create payment links in the merchant portal at https://admin.dev.gingerpayments.com. You don't need a technical integration, so you can start accepting payments right away.

Send a POST request to /v1/paymentlinks/:

curl https://api.dev.gingerpayments.com/v1/paymentlinks/ \
  --user "$API_KEY:" \
  --header "Content-Type: application/json" \
  --data '{
    "merchant_order_id": "EXAMPLE001",
    "amount": 995,
    "currency": "EUR",
    "description": "Invoice EXAMPLE001",
    "expiration_period": "P20D",
    "payment_methods": ["credit-card", "apple-pay", "google-pay"],
    "return_url": "https://www.example.com/thank-you",
    "webhook_url": "https://www.example.com/webhook"
  }'

The response contains the link id and the payment_url. The response is shortened:

{
  "id": "a8c1b7b0-9c73-4bd8-94f4-37c3070e78c7",
  "merchant_order_id": "EXAMPLE001",
  "amount": 995,
  "currency": "EUR",
  "description": "Invoice EXAMPLE001",
  "expiration_period": "P20D",
  "payment_methods": ["credit-card", "apple-pay", "google-pay"],
  "payment_url": "https://api.dev.gingerpayments.com/paylink/a8c1b7b0-9c73-4bd8-94f4-37c3070e78c7/"
}

Send the payment_url to your customer. Save the id to look up the link later.

FieldRequiredDescription
merchant_order_idYesYour own order reference.
amountYesAmount in the smallest currency unit: 995 is € 9.95.
currencyYesISO 4217 currency code, such as EUR.
descriptionNoDescription of the payment. Without it, the orders have no description.
payment_methodsNoPayment methods to show on the hosted payment page. Without it, every active payment method is shown.
expiration_periodNoHow long the link stays valid, as an ISO 8601 duration such as P20D for 20 days. The default is 30 days.
return_urlNoWhere your customer goes after paying.
webhook_urlNoWhere order status changes are sent.

You can't create links in a batch, but there's no limit on the number of links. Send one request per link.

Every time your customer opens the link and tries to pay, Ginger Payments creates a new order. A link allows up to 25 attempts.

Retrieve the link to see its status and all orders created from it:

curl https://api.dev.gingerpayments.com/v1/paymentlinks/a8c1b7b0-9c73-4bd8-94f4-37c3070e78c7/ \
  --user "$API_KEY:"
{
  "id": "a8c1b7b0-9c73-4bd8-94f4-37c3070e78c7",
  "merchant_order_id": "EXAMPLE001",
  "amount": 995,
  "currency": "EUR",
  "description": "Invoice EXAMPLE001",
  "expiration_period": "P20D",
  "payment_url": "https://api.dev.gingerpayments.com/paylink/a8c1b7b0-9c73-4bd8-94f4-37c3070e78c7/",
  "created": "2026-10-12T15:39:12.773776+00:00",
  "modified": "2026-10-12T16:18:37.196467+00:00",
  "completed": "2026-10-12T16:18:32.574222+00:00",
  "completed_order_id": "3bb663cc-2a20-400d-8bf6-18d9695d0c66",
  "orders": {
    "error": ["0d79014c-0aaa-4fd6-87c5-c8cfa5f5ac69"],
    "completed": ["3bb663cc-2a20-400d-8bf6-18d9695d0c66"]
  },
  "status": "completed",
  "reason": "Completed"
}

The orders object lists the IDs of all orders created from the link, grouped by order status. In this example, the first attempt failed and the second one succeeded. The completed_order_id is the order that was paid. Retrieve an order for its details.

Link statusMeaning
newThe link was created. Your customer hasn't tried to pay yet.
processingYour customer opened the link and a payment is in progress.
all_unsuccessfulEvery attempt so far failed. The link hasn't expired, so your customer can try again.
completedOne of the attempts succeeded. You've been paid.
expiredThe link expired without a successful payment.

The webhooks you receive are about the orders created from the link, not about the link itself. See webhooks.

On this page