Redirect Checkout
Create a remittance via API and redirect your customer to Glin's hosted checkout page. No frontend integration required.
Overview
The Redirect Checkout is the simplest way to accept payments with Glin. Your server creates a remittance through the Merchant API, receives a checkoutUrl in the response, and redirects the customer to that URL. Glin handles the entire payment experience -- collecting customer details, processing the payment, and redirecting the customer back to your site.
How It Works
- Your server creates a remittance via
POST /merchant-api/remittances/ - Redirect the customer to the
checkoutUrlfrom the response - Customer fills in their details and pays on Glin's hosted page
- On success, the customer is redirected to your
successUrl - Glin sends a webhook to your registered endpoint with payment confirmation
Create a Remittance
/merchant-api/remittances/Authorization header. You can find it in your merchant dashboard. Request
curl --request POST \
--url https://pay.staging.glin.com.br/merchant-api/remittances/ \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"clientReferenceId": "order-12345",
"amount": 500.00,
"currency": "USD",
"expiresAt": "2026-03-01T19:00:00Z",
"successUrl": "https://your-site.com/order/success?id=12345",
"cancelUrl": "https://your-site.com/order/cancel?id=12345"
}'Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "created",
"clientReferenceId": "order-12345",
"amount": 500.00,
"currency": "USD",
"payoutAmount": 500.00,
"payoutCurrency": "USD",
"expiresAt": "2026-03-01T19:00:00Z",
"successUrl": "https://your-site.com/order/success?id=12345",
"cancelUrl": "https://your-site.com/order/cancel?id=12345",
"checkoutUrl": "https://pay.glin.com.br/remittances/550e8400-e29b-41d4-a716-446655440000",
"shortUrl": "https://www.glin.com.br/pay/K7M2QXPTRW"
}Redirect the Customer
After creating the remittance, redirect the customer to the checkoutUrl returned in the response. This can be a server-side redirect (HTTP 302) or a client-side redirect using window.location.href.
// Client-side redirect
window.location.href = response.checkoutUrl;checkoutUrl expires at the time specified in expiresAt. Make sure to redirect the customer promptly after creating the remittance. Webhook Notification
When the payment completes, Glin sends a webhook notification to your registered endpoint. Use webhooks to reliably confirm payment status on your server -- do not rely solely on the customer being redirected to your successUrl.
In remittance_paid, object.payment.method identifies the successful method and object.payment.installments identifies the selected installment count. Failed payment attempts are not reported in this object.
Field Reference
| Name | Type | Required | Description |
|---|---|---|---|
id | string (UUID) | — | Unique identifier for the remittance. |
status | string | — | Current status of the remittance. Starts as "created". |
clientReferenceId | string | — | Your own reference ID to correlate the remittance with your internal order. |
amount | number | — | Payment amount in the specified currency. |
currency | string | — | ISO 4217 currency code (e.g. "USD", "BRL"). |
payoutAmount | number | — | What you receive, in your payout currency (payoutCurrency). Present here because this example prices in the payout currency. Price in BRL instead and you get estimatedPayout — a quote at the current rate — until a payer starts checkout and fixes it. |
payoutCurrency | string | — | Currency of payoutAmount: the payout currency on your contract. |
expiresAt | string (ISO 8601) | — | Expiration timestamp. The checkout link becomes invalid after this time. |
successUrl | string (URL) | — | URL to redirect the customer to after a successful payment. |
cancelUrl | string (URL) | — | URL to redirect the customer to if they cancel the checkout. |
checkoutUrl | string (URL) | — | Glin-hosted checkout page URL. Redirect your customer here to complete payment. |