Remittance API

Create, retrieve, and track cross-border payment remittances through the Merchant API.

Create Remittance

POST/merchant-api/remittances/

Creates a new remittance and returns a checkoutUrl where your customer can complete the payment. Each remittance represents a single cross-border payment from a customer to your merchant account.

Request Body

Name Type Required Description
clientReferenceIdstringUnique order reference from your system. Must be unique across all remittances.
typestring—How to interpret amount: "target_amount_fixed" (default; amount is in the merchant payout currency) or "source_amount_fixed" (amount is fixed in BRL).
amountnumberPayment amount in the specified currency.
currencystringISO 4217 currency code (e.g. "USD", "EUR", "GBP", "JPY", "CAD"). Must match the currency configured in your merchant contract.
offeringTypestring—What you are selling: "PRODUCT", "SERVICE" or "HYBRID". Omit it and your store default applies, so existing integrations need no change.
serviceAmountnumber—Only with "HYBRID", and required with it. The part of amount that is service; the remainder is the product part. Must be greater than 0 and less than amount.
allowedPaymentMethodsarray of string—Which methods the payer may use: "card", "pix", or both. Omit it to allow every method enabled for your account, including ones added later. Send a list and that list is fixed, so a method added later will not join it. An empty list is rejected.
customerIdnumber—Address this sale to a customer from POST /customers. The checkout then arrives filled in and bound — only that document can pay the sale, whoever opens the link — and if the record is confirmed, the payer is not asked to identify themselves at all. Fixed at creation: a sale cannot be re-addressed, so cancel it and create another. See the Customers API.
maxInstallmentsinteger—The most card installments this charge offers. Omit it to offer every installment plan your contract prices, including plans priced later. Send 1 to sell in a single payment only. Rejected when your contract does not price that many. This is a ceiling on one card payment — not the number of charges in a recurring plan, which is totalInstallments on /recurring-payments.
interestFreeInstallmentsUpTointeger—Absorb the card installment interest up to this installment, so the payer sees that many interest-free and pays the interest only beyond it. From 2 — a single payment has no interest to absorb — up to what your contract prices, and never above maxInstallments. Omit it and the payer pays all the interest, which is the default every existing integration already gets. What you receive drops by the interest you take on.
merchantAbsorbsPaymentCostsboolean—Absorb the card processing fee: a payer who pays by card is charged that much less, and you receive that much less. Applies to every installment plan the charge offers. Only the card fee — the IOF and the service fee keep following the currency you priced in, and a PIX payer sees no change. Omit it, or send false, and the payer pays the fee, which is the default every existing integration already gets. Accepted but inert on a charge no payer could put on a card.
pixDiscountPercentnumber—Charge a payer who pays by PIX this percentage less, and receive that much less yourself. At most 99.99, with at most two decimal places. The whole PIX price scales by it, so what you receive falls in the same proportion rather than by a fee; a card payer sees no change. Omit it, or send 0, and PIX costs the same as card. Rejected when no payer could pay the charge by PIX, and when the discount would take the payer's total below R$ 10,00. Mutually exclusive with pixDiscountAmount.
pixDiscountAmountnumber—Take this much off the PIX price, in BRL — the absolute form of the same discount, for when you want to hold the discount in money rather than in percent. An amount OFF, not a price: 50.00 on a charge that would otherwise cost R$ 580,00 means the payer pays R$ 530,00. Always BRL, whatever you priced the charge in. Omit it, or send 0, for no discount. No fixed ceiling — it has to leave the payer at least R$ 10,00, which depends on the charge. The rest of the PIX price scales to match, so the breakdown still sums to the discounted total. Any coupon stops applying to PIX. Mutually exclusive with pixDiscountPercent, though 0 in the one you are not using is fine.
expiresAtstring—Expiration timestamp in ISO 8601 format (UTC). The checkout becomes invalid after this time. Must be at least 15 minutes from now.
successUrlstring—URL to redirect the customer to after a successful payment.
cancelUrlstring—URL to redirect the customer to if they cancel the checkout.

The clientReferenceId must be unique across all your remittances. Use it to correlate Glin remittances with orders in your own system.

Example Request

cURL
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",
  "type": "target_amount_fixed",
  "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

json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "created",
  "clientReferenceId": "order-12345",
  "type": "target_amount_fixed",
  "amount": 500.00,
  "currency": "USD",
  "offeringType": "PRODUCT",
  "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"
}

Response Fields

Name Type Required Description
idstring (UUID)Unique identifier for the remittance.
statusstringCurrent remittance status. Starts as "created". All status values are lowercase.
clientReferenceIdstringYour order reference echoed back.
typestringWhether the source amount or target payout amount is fixed.
amountnumberPayment amount in the specified currency.
currencystringISO 4217 currency code.
offeringTypestringThe classification this remittance was created with, resolved to your store default when you omitted it.
serviceAmountnumber—The service part of amount. Present only when offeringType is "HYBRID".
allowedPaymentMethodsarray of string—The restriction this remittance was created with, echoed back exactly as you sent it. Omitted entirely when you sent none, which means every method is allowed.
customerIdnumber—The customer this sale is addressed to, echoed back. This is who you addressed it to, not who paid — those can differ, and the payer's own record is reported by GET /remittances/{id}/customer once the sale is paid. Absent when you addressed the sale to nobody.
maxInstallmentsinteger—The installment ceiling this remittance was created with, echoed back exactly as you sent it. Omitted entirely when you sent none, which means every plan your contract prices.
interestFreeInstallmentsUpTointeger—The interest-free ceiling this remittance was created with, echoed back exactly as you sent it. Omitted entirely when you sent none.
merchantAbsorbsPaymentCostsboolean—Present and true when this remittance takes the card fee off the payer. Omitted entirely otherwise — including when you sent false, since false is the default. So the field appearing at all means the charge carries the policy.
pixDiscountPercentnumber—The PIX discount this remittance was created with, echoed back at two decimal places. Omitted entirely when you sent none.
pixDiscountAmountnumber—The absolute PIX discount this remittance was created with, echoed back at two decimal places. Omitted entirely when you sent none, including when you sent 0. At most one of this and pixDiscountPercent is ever present, because the API refuses both together.
payoutAmountnumber—What you receive, in your payout currency. Present as soon as that figure is known: immediately when you priced in your payout currency, and only once a payer starts checkout when you priced in BRL, since until then there is no rate. If you price in BRL this is the figure that matters: amount is the BRL you charged, this is what the sale settles to.
payoutCurrencystring—Currency of payoutAmount — the payout currency on your contract. Present whenever payoutAmount is.
exchangeRatenumber—The rate the sale was fixed at, in BRL per unit of payoutCurrency. Absent until a payer starts checkout, whichever currency you priced in — so a payout-currency sale can carry payoutAmount with no exchangeRate yet.
estimatedPayoutobject—An indicative payout, quoted at the current rate, for a sale whose rate is not fixed yet. Present only while payoutAmount is absent and the sale can still be paid — so exactly one of the two answers "what will I receive" at any moment. Not a commitment: the rate is fixed when a payer starts checkout, and this moves with the market until then.
estimatedPayout.amountnumber—What you would receive if a payer paid at this moment, net of the FX spread, IOF and the service fee. Assumes no cost policy at all — interest-free installments, absorbed payment costs or a PIX discount change what you finally receive (see "Installments and who pays the interest" and "Absorbing the card fee and discounting PIX" below).
estimatedPayout.currencystring—Currency of estimatedPayout.amount — the payout currency on your contract.
estimatedPayout.exchangeRatenumber—The rate this quote used, in BRL per unit of estimatedPayout.currency. The same quantity exchangeRate will carry once a payer fixes it, so the two are comparable — they differ by however the market moved in between.
expiresAtstringExpiration timestamp in ISO 8601 format.
successUrlstring—Redirect URL for successful payments.
cancelUrlstring—Redirect URL for canceled checkouts.
checkoutUrlstringGlin-hosted checkout page URL. Redirect your customer here to complete payment.
shortUrlstring—The same checkout at roughly half the length, for sending somewhere a long URL does not survive — a chat app, an SMS, anything that has to recognise a link in free text. Carries a short code instead of the remittance UUID. checkoutUrl stays canonical and never changes shape; use whichever suits the channel. Absent on remittances created before short codes existed.
paymentobject—The successfully confirmed payment. Omitted until the remittance has been paid.
payment.methodstring—Confirmed payment method: "card", "pix", or "other". Present whenever payment is present.
payment.installmentsinteger—Number of installments used. PIX payments use 1. Present whenever payment is present.
lastOutcomeobject—How the most recent payment attempt on this sale ended. Omitted until a payer has attempted one. Read it alongside status, which answers the different question of whether the sale can still be paid: a sale whose PIX arrived and was returned reports "returned" here while its status is still "ordering", because the link goes on accepting a fresh attempt until it expires.
lastOutcome.outcomestring—"confirmed" (money arrived and stayed), "returned" (money arrived and was sent back to the paying account), "refused" (declined, no money moved), "expired" (the payer did not finish it) or "canceled" (the sale itself was canceled or changed).
lastOutcome.reasonstring—Why, when the attempt did not succeed: "payer_account_owner_mismatch", "duplicate_payment", "card_declined", "insufficient_funds", "fraud_prevention", "provider_error", "attempt_expired" or "other".
lastOutcome.atstring—When that attempt ended, in ISO 8601 (UTC).

Product or service

offeringType records what a sale is: PRODUCT, SERVICE, or HYBRID when one sale is both. It is optional — leave it out and the default configured for your store applies, so an existing integration keeps working unchanged.

For a HYBRID sale, send serviceAmount alongside it. It is the part of amount that is service, in the same currency; the remainder is the product part. A 1000.00 USD sale with a serviceAmount of 200.00 is 800.00 of goods and 200.00 of service.

cURL - hybrid sale
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-12346",
  "amount": 1000.00,
  "currency": "USD",
  "offeringType": "HYBRID",
  "serviceAmount": 200.00
}'

Classification is fixed when the remittance is created and cannot be changed afterwards, so send it on the create call rather than correcting it later.

These combinations are rejected with 400, and the error type ends in the code shown:

CodeWhen
offering-type.service-amount.requiredofferingType is HYBRID but no serviceAmount was sent.
offering-type.service-amount.not-hybrid A serviceAmount was sent without offeringType: "HYBRID".
offering-type.service-amount.exceeds-amountserviceAmount is equal to or greater than amount. At the full amount the sale is simply a service, so send offeringType: "SERVICE" instead.

Charging in BRL, and what you receive

amount and currency are the figure you fixed. Send your payout currency and that is what the payer is charged, converted at checkout. Send "currency": "BRL" and you have fixed the Brazilian price instead — the payer sees exactly that, and what reaches you depends on the rate.

Either way payoutAmount and payoutCurrency tell you what the sale settles to, and they appear as soon as that is knowable. Price in your payout currency and they are on the create response already. Price in BRL and they are absent until a payer starts checkout, because until then no rate has been fixed — so reconcile a BRL sale on the remittance_paid webhook or a later GET, never on the create response.

Until then you get estimatedPayout instead: what the sale would pay out at the current rate, quoted from the same rates the checkout itself will use. So a BRL-priced sale always answers “what will I receive” — with a quote at creation, and with the settled figure once a payer fixes it. Exactly one of the two is present at any moment, and the quote also disappears once a link expires or is cancelled, because a number nobody can realise is worse than none.

Treat it as indicative, not as a commitment. The rate moves until a payer fixes it, and the quote assumes no payment-cost absorption — with interestFreeInstallmentsUpTo set, or an account that absorbs payment costs, the settled figure can land below the quote depending on how the payer pays.

exchangeRate follows the rate, not the amount: it is absent until a payer starts checkout whichever currency you priced in. A payout-currency sale can therefore carry a payoutAmount with no exchangeRate yet.

A BRL-priced sale, at creation
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "created",
  "clientReferenceId": "order-12345",
  "type": "source_amount_fixed",
  "amount": 500.00,
  "currency": "BRL",
  "estimatedPayout": {
    "amount": 93.93,
    "currency": "USD",
    "exchangeRate": 5.0354
  },
  "checkoutUrl": "https://pay.glin.com.br/remittances/550e8400-e29b-41d4-a716-446655440000",
  "shortUrl": "https://www.glin.com.br/pay/K7M2QXPTRW"
}
The same sale, once paid
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "paid",
  "clientReferenceId": "order-12345",
  "type": "source_amount_fixed",
  "amount": 500.00,
  "currency": "BRL",
  "payoutAmount": 92.38,
  "payoutCurrency": "USD",
  "exchangeRate": 5.1200,
  "payment": { "method": "pix", "installments": 1 }
}

payoutAmount is what you receive, not amount converted. Once a payment exists it reflects the method and instalments the payer chose, so the two can differ even when you priced in your own payout currency.

Restricting payment methods

By default a remittance accepts every payment method enabled for your account, and the checkout offers the payer all of them. Send allowedPaymentMethods to narrow that to a subset — ["pix"] for a Pix-only charge, ["card"] for a card-only one.

cURL - Pix only
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-12347",
  "amount": 500.00,
  "currency": "USD",
  "allowedPaymentMethods": ["pix"]
}'

Omitting the field is not the same as listing everything. Omit it and the remittance accepts whatever your account offers, including methods we add later. Send an explicit list and that list is fixed: a method added later will not join it, and you will need to send the new list to start accepting it. If you want new methods automatically, leave the field out.

The restriction narrows, it never widens. Listing a method that is not enabled for your account does not enable it, and the checkout only ever offers the methods that are both enabled for you and allowed on the remittance.

Rejected with 400, and the error type ends in the code shown:

CodeWhen
allowed-payment-methods.emptyallowedPaymentMethods was sent as an empty list. Omit the field instead — an empty list would be a charge nobody can pay.
allowed-payment-methods.not-selectable The list contains something other than "card" or "pix". "other" records a settlement made outside Glin and cannot be offered to a payer.
remittance.no-payment-option-available The list leaves no method your account can accept for this amount — for example ["card"] when card is not enabled for you, or when the amount is over the card limit.
order.payment-method-not-allowed Returned by POST /remittances/{id}/pay, not by create: the payment named a method this remittance does not allow. The restriction is enforced on the payment itself, so narrowing it is not only a hint to the checkout.

Installments and who pays the interest

A card charge is offered in every installment plan your contract prices, up to what the card acquirer currently accepts, and the payer pays the installment interest. Two optional fields change that per charge: maxInstallments caps how many installments the checkout offers, and interestFreeInstallmentsUpTo moves the interest onto you up to a given installment.

cURL - up to 6x, 3x interest-free
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-12348",
  "amount": 500.00,
  "currency": "USD",
  "maxInstallments": 6,
  "interestFreeInstallmentsUpTo": 3
}'

They stack: the example above offers 1x to 6x, with 1x, 2x and 3x costing the payer the same as a single payment and 4x to 6x carrying their usual interest. Send maxInstallments: 1 to sell in a single payment only, and send neither field to keep exactly the behaviour you have today.

Omitting maxInstallments is not the same as sending your contract's current maximum. Omit it and the charge offers whatever your contract prices, including plans priced later. Send a number and that ceiling is fixed for the life of the charge.

interestFreeInstallmentsUpTo lowers what you receive: the interest the payer no longer pays comes off your payout, and how much depends on how many installments they choose. estimatedPayout assumes no absorption, so a charge that absorbs interest can settle below the quote. The settled payoutAmount is the figure to reconcile against.

The ceiling is enforced on the payment, not only on what the checkout shows: POST /remittances/{id}/pay refuses more installments than the charge allows.

Rejected with 400, and the error type ends in the code shown:

CodeWhen
max-installments.above-contract-maximummaxInstallments is above what your contract prices. The message carries the maximum, so you can read it off a single rejected call.
max-installments.card-unavailable No payer could put this charge on a card, so there is nothing to cap — allowedPaymentMethods: ["pix"], card not enabled for your account, or an amount over your card limit.
max-installments.below-interest-freemaxInstallments is below interestFreeInstallmentsUpTo: the charge cannot absorb the interest on an installment it does not sell.
max-installments.leaves-no-plan Your contract prices no plan at or below the ceiling — a contract that starts at 2x with maxInstallments: 1.
payment-link.installment-interest-absorption.invalid-max-installmentsinterestFreeInstallmentsUpTo is above what your contract prices.
payment-link.installment-interest-absorption.card-unavailableinterestFreeInstallmentsUpTo on a charge no payer could put on a card, so there is no installment interest to absorb.
order.installments-not-allowed Returned by POST /remittances/{id}/pay, not by create: the payment asked for more installments than the charge allows.

Absorbing the card fee and discounting PIX

Who pays each cost follows the currency you price in. Price in your payout currency and the payer pays everything on top — the IOF, the service fee, the card fee and any installment interest — so you receive the figure you asked for. Price in BRL and the IOF and the service fee come out of your side instead, so the payer pays the BRL you named; the card fee and the interest still land on them, as the amount by which the card price sits above the PIX one. Three further optional fields move those last two costs per charge, so you can land on an exact price:

  • merchantAbsorbsPaymentCosts: true takes the card processing fee off a card payer, at every installment plan the charge offers.
  • pixDiscountPercent charges a PIX payer that percentage less.
  • pixDiscountAmount takes a fixed amount off the PIX total, in BRL, when you would rather hold the discount in money than in percent.
cURL - absorb the card fee, 5% off on PIX
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-12349",
  "amount": 500.00,
  "currency": "USD",
  "merchantAbsorbsPaymentCosts": true,
  "pixDiscountPercent": 5.00
}'

The same discount stated in money instead. This charge is priced in BRL, so the regular PIX total is R$ 2.500,00 and R$ 125,00 off is the same 5% — just fixed in money rather than in percent:

cURL - a fixed amount off on PIX
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-12350",
  "type": "source_amount_fixed",
  "amount": 2500.00,
  "currency": "BRL",
  "pixDiscountAmount": 125.00
}'

Each touches one rail only. In the first example a card payer is charged the card fee less and a PIX payer is charged 5% less; the card price is unaffected by the PIX discount and the PIX price is unaffected by the absorption. They compose with the installment fields too: interestFreeInstallmentsUpTo alongside merchantAbsorbsPaymentCosts means the payer sees neither the fee nor the interest up to that installment.

Both discount fields are an amount off, not a price. Sending pixDiscountAmount: 50.00 on a charge that would otherwise cost R$ 580,00 charges the payer R$ 530,00, and what you receive falls in the same proportion as the price — less than the R$ 50,00 itself converted to your payout currency, because the discounted total also carries less IOF, service fee and processing fee. Neither field can raise a price: there is no way to charge a PIX surcharge through this API.

Send one or the other. Zero means no discount, so 0 in the field you are not using is accepted — useful when your own configuration carries both — but two non-zero figures are rejected, because there is no sensible precedence between them.

Which form to use. The difference only matters when you price in your payout currency. The regular PIX total is in BRL and moves with the exchange rate, so on a USD- or EUR-priced charge a fixed pixDiscountAmount stays the same money off while being a larger or smaller share of the sale from day to day, and pixDiscountPercent is the one that holds its share constant. Which you want depends on whether you are protecting a round figure or a margin. Price in BRL and the two are interchangeable — the PIX total is then exactly the amount you named, so the arithmetic between them is yours to do.

A drifting share is not the only consequence. On a charge priced in your payout currency, a fixed amount off stays the same BRL figure while the rate moves. If BRL strengthens after you create the charge, the regular PIX total falls in BRL while the discount does not, so the discount eats a growing share of the sale and of what you receive. Creation already refuses an amount that leaves the payer under the R$ 10,00 minimum, and that check runs again on every quote: if a sustained strengthening pushes the discounted total under it, the charge stops quoting and the payer gets a checkout that cannot load — the same symptom as an account change, from a different cause. If BRL weakens instead, the discount becomes a smaller share and you keep more of the sale than at creation. It takes a deep discount and a sustained move: the closer the discount is to the whole charge, the less movement it needs, and a small one is not meaningfully exposed. pixDiscountPercent has none of this, because a percentage of a moving total moves with it, and neither does an amount off on a charge priced in BRL, because the PIX total is then the amount you named and does not move.

All three levers lower what you receive, and by design: the card fee comes off your payout, and either PIX discount scales your payout down in the same proportion as the price — a 5% discount means 5% less, not the fee, and R$ 50 off a R$ 580 charge is about 8.6% less. None of them can raise it. estimatedPayout assumes no cost policy at all, so it reads too high for any of the three. Reconcile against the settled payoutAmount.

merchantAbsorbsPaymentCosts takes off the whole card fee, which leaves the card price with no processing fee while PIX still carries its own. So a single card payment lands slightly below the PIX price — by the PIX fee rate on your contract — rather than level with it, which makes card the cheaper rail for the payer and the dearer one for you. Bringing PIX down to meet it takes a small pixDiscountPercent of roughly that same rate. Read both prices back off the checkout before you advertise either.

merchantAbsorbsPaymentCosts is accepted but does nothing on a charge no payer could put on a card — there is no card fee to absorb. A pixDiscountPercent or pixDiscountAmount on a charge no payer could pay by PIX is rejected instead, since a discount with no price to apply to is more likely a mistake than a no-op.

A charge carrying pixDiscountPercent or pixDiscountAmount depends on PIX staying available on your account for as long as the charge is open, and one carrying interestFreeInstallmentsUpTo depends on card in the same way. This only comes up if your account changes while a charge is still open — that rail switched off, or its limit lowered below the charge amount. If it does, the charge stops quoting altogether: the payer gets a checkout that cannot load, not one that falls back to the undiscounted price. Nothing in the API shows it — creation already succeeded, GET /remittances/{id} still answers 200, and estimatedPayout is simply absent — so it reaches you as a payer who says they cannot pay. It is not a fault in your request, and sending it again will not help: the charge has to be recreated without the policy, or the rail restored on your account. Contact support if you see it. merchantAbsorbsPaymentCosts does not behave this way — with no card option there is simply no fee to absorb, and the charge keeps quoting its PIX price.

Rejected with 400, and the error type ends in the code shown:

CodeWhen
payment-link.payment-cost-policy.pix-unavailablepixDiscountPercent or pixDiscountAmount on a charge no payer could pay by PIX — allowedPaymentMethods: ["card"], PIX not enabled for your account, or an amount over your PIX limit.
payment-link.payment-cost-policy.merchant-receivable-too-low The policy would leave the payer a total under the R$ 10,00 minimum. Reachable with a large pixDiscountPercent on a small charge, or with a pixDiscountAmount close enough to the whole PIX total to do the same.
payment-link.payment-cost-policy.invalid-pix-discount You sent a non-zero pixDiscountPercent together with a non-zero pixDiscountAmount. The two are mutually exclusive: they are two ways to say the same thing and there is no sensible precedence between them. Zero is not a discount, so 0 in the field you are not using never triggers this. A negative figure, a percentage of 100 or more, or more than two decimal places are rejected by the request body before this check.

Get Remittance

GET/merchant-api/remittances/{id}

Retrieves the current state of a remittance by its unique identifier. The response format is identical to the create endpoint.

Path Parameters

Name Type Required Description
idstring (UUID)The unique identifier of the remittance.
cURL
curl --request GET \
  --url https://pay.staging.glin.com.br/merchant-api/remittances/550e8400-e29b-41d4-a716-446655440000 \
  --header 'Authorization: Bearer YOUR_API_KEY'

Response after payment

json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "paid",
  "clientReferenceId": "order-12345",
  "type": "target_amount_fixed",
  "amount": 500.00,
  "currency": "USD",
  "payoutAmount": 500.00,
  "payoutCurrency": "USD",
  "exchangeRate": 5.1200,
  "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",
  "payment": {
    "method": "card",
    "installments": 6
  }
}

The payment object describes only the payment that successfully paid the remittance. Failed attempts are never returned here. It is omitted before payment is confirmed.

Sale Events

GET/merchant-api/remittances/{id}/events

Everything that happened to a sale, oldest first: created, payer arrived, money received, money returned and why, paid, expired. Answers for a sale in any status, including one nobody ever tried to pay — which then has a single link_created entry.

This is the pull side of the webhooks, and the only way to recover a window you missed. Webhook delivery is push-only: an endpoint that keeps failing is suspended and the events it would have received are not queued for later. Reading this endpoint is also how you see that money arrived and was sent back, which no status transition reports — the sale stays ordering through it, because the link really does go on accepting another attempt.

Path Parameters

Name Type Required Description
idstring (UUID)The unique identifier of the remittance.
cURL
curl --request GET \
  --url https://pay.staging.glin.com.br/merchant-api/remittances/550e8400-e29b-41d4-a716-446655440000/events \
  --header 'Authorization: Bearer YOUR_API_KEY'

Response

json
[
  {
    "id": "0192f3c4-7b21-7c3e-9a44-1b2c3d4e5f60",
    "type": "link_created",
    "happenedAt": "2026-11-05T13:02:11Z"
  },
  {
    "id": "0192f3c4-9d55-7f12-8b03-aa11bb22cc33",
    "type": "checkout_started",
    "happenedAt": "2026-11-06T09:11:40Z"
  },
  {
    "id": "0192f3c5-0a71-7e09-9d87-ff00112233aa",
    "type": "payment_pending",
    "happenedAt": "2026-11-06T09:12:03Z",
    "method": "pix",
    "amount": 2480.00,
    "currency": "BRL"
  },
  {
    "id": "0192f3c5-2b18-7a44-81cd-445566778899",
    "type": "payment_received",
    "happenedAt": "2026-11-06T09:14:19Z",
    "method": "pix",
    "amount": 2480.00,
    "currency": "BRL"
  },
  {
    "id": "0192f3c5-2b55-7bb1-9e02-99aabbccddee",
    "type": "payment_returned",
    "happenedAt": "2026-11-06T09:14:22Z",
    "method": "pix",
    "amount": 2480.00,
    "currency": "BRL",
    "reason": "payer_account_owner_mismatch",
    "bankReference": "E1234567820261106091422abcdef123"
  }
]

Event Fields

Name Type Required Description
idstring (UUID)Stable identifier of this event. The same event keeps it across a webhook retry, so it works as an idempotency key on either transport.
typestringOne of "link_created", "checkout_started", "payment_pending", "payment_received", "payment_returned", "payment_refused", "attempt_expired", "paid", "link_expired", "canceled" or "payout_sent".
happenedAtstringWhen it happened, in ISO 8601 (UTC).
methodstring—How the payer was paying: "card", "pix" or "other". Present on the payment events.
amountnumber—What the payer was charged, in the payer's currency. Present on the payment events. What you receive is on the sale itself, not here.
currencystring—Currency of amount.
reasonstring—Why the attempt ended as it did. Present on "payment_returned", "payment_refused" and "attempt_expired".
bankReferencestring—The rail's own reference for the movement. On a returned PIX this is the devolution end-to-end id — the reference your payer's bank statement shows for the money coming back, which is what they will ask you for. Absent while a devolution is still in flight, and on rails that do not issue one.

Get Customer Details

GET/merchant-api/remittances/{id}/customer

Retrieves the customer information associated with a remittance after the customer has completed payment. This endpoint is only available once the remittance reaches the paid status or later.

Path Parameters

Name Type Required Description
idstring (UUID)The unique identifier of the remittance.

Response

json
{
  "id": 5120,
  "name": "Maria Silva",
  "email": "maria@example.com",
  "countryCode": "BR",
  "taxId": "123.456.789-00",
  "address": {
    "address1": "Rua Example - 100",
    "address2": "Apt 42",
    "neighborhood": "Centro",
    "city": "Sao Paulo",
    "province": "SP",
    "zip": "01001000",
    "country": "BR"
  }
}

Response Fields

Name Type Required Description
idnumber—The payer's customer id on your account — the same id space as POST /customers and as the sale's customerId. Store it, or resolve it again later by posting the document to POST /customers, to address a future sale to this payer without asking them to identify themselves again.
namestringFull name of the customer.
emailstringEmail address of the customer.
countryCodestringISO 3166-1 alpha-2 country code (e.g. "BR").
taxIdstringCustomer tax identification number (CPF or CNPJ).
addressobject—Billing address used by the confirmed payment, using the legacy address1, address2, neighborhood, city, province, zip, and country fields. It is null when that payment method did not collect an address.

This endpoint returns 404 if the customer has not yet completed payment. Wait for a remittance_paid webhook before calling this endpoint.

The id here is the payer's customer record on your account. Pass it as customerId on a future sale and that checkout arrives filled in, bound to their document, and — because they have already paid you once — skips the identity step altogether. See the Customers API.

Confirm Payment

POST/merchant-api/remittances/{id}/pay

Submits a payment for the remittance. This endpoint is called from your backend after the SDK collects and tokenizes payment data via the onPaymentReady callback.

A remittance represents one checkout/payment intent, not one card attempt. If a card attempt is declined, submit the next attempt to the same remittance while it remains continuable. Glin allows multiple attempts but only one paid order per remittance.

This endpoint requires your API key (Bearer token) and must be called from your backend -- never from client-side code. The SDK's onPaymentReady callback provides the paymentData object to forward here.

Path Parameters

Name Type Required Description
idstring (UUID)The unique identifier of the remittance.

Request Body

Name Type Required Description
customerIdnumber—ID of a registered payer you already hold — from POST /checkout-api/customer/register, from a previous pay response, or a confirmed record from POST /customers. If provided, the customer object is not needed. A draft from POST /customers cannot be charged here: it is your description of someone, not a payer Glin has met, and is refused with merchant-customer.not-registered — send the payer to the hosted checkout, or register them first and charge under the id that returns. If the sale was addressed to a customer at creation, the payer named here — by this id or by customer.taxId — must hold the document the sale is addressed to, or the call is refused with remittance.customer-not-assigned. The check is on the document, not on the id, so the id registration returns works even though it is a different record from the draft you addressed the sale to.
customerobject—Customer data (taxId, name, email, and phone). Required if customerId is not provided. The server runs a compliance check before processing.
customer.taxIdstringCustomer CPF or CNPJ (numbers only).
customer.namestringFull name of the customer.
customer.emailstringEmail address of the customer.
customer.phonestringCustomer phone number in E.164 format, for example +5511999999999. Required when customer data is sent inline.
addressobjectCustomer address in Brazil.
address.zipCodestringBrazilian CEP (8 digits, no formatting).
address.streetstringStreet name.
address.numberstringStreet number.
address.complementstring—Apartment, suite, etc.
address.neighborhoodstringNeighborhood name.
address.citystringCity name.
address.statestringTwo-letter state code (e.g. "SP").
paymentobjectPayment details.
payment.methodstringPayment method: "card" or "pix".
payment.tokenstring—MercadoPago card token. Required for card payments.
payment.paymentMethodIdstring—Card brand identifier (e.g. "visa", "master"). Required for card payments.
payment.installmentsnumber—Number of installments for card payments. Defaults to 1. Refused with order.installments-not-allowed when above the charge's maxInstallments.
payment.deviceIdstring—MercadoPago device fingerprint for fraud prevention. The SDK provides this automatically.

Provide either customerId (a registered payer's id, from POST /checkout-api/customer/register or a previous pay response) or customer (inline data) -- not both. If you send inline customer data, the server runs a compliance check before processing the payment, which adds a few seconds.

Example Request (Card)

cURL
curl --request POST \
  --url https://pay.staging.glin.com.br/merchant-api/remittances/550e8400-e29b-41d4-a716-446655440000/pay \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "customer": {
    "taxId": "12345678900",
    "name": "Maria Silva",
    "email": "maria@example.com",
    "phone": "+5511999999999"
  },
  "address": {
    "zipCode": "01001000",
    "street": "Rua Example",
    "number": "100",
    "complement": "Apt 42",
    "neighborhood": "Centro",
    "city": "Sao Paulo",
    "state": "SP"
  },
  "payment": {
    "method": "card",
    "token": "mp_card_token_abc123",
    "paymentMethodId": "visa",
    "installments": 1
  }
}'

Response (Card - Approved)

json
{
  "orderId": "ord-550e8400-e29b-41d4",
  "status": "APPROVED",
  "customerId": 12345,
  "pix": null,
  "threeDSecure": null
}

Response (PIX)

json
{
  "orderId": "ord-550e8400-e29b-41d4",
  "status": "PENDING",
  "customerId": 12345,
  "pix": {
    "qrCode": "00020126580014br.gov.bcb.pix...",
    "qrCodeImage": "data:image/png;base64,..."
  },
  "threeDSecure": null
}

Response (Card - Canceled)

json
{
  "orderId": "ord-550e8400-e29b-41d4",
  "status": "CANCELED",
  "cancelReason": "VALIDATION_FAILED",
  "customerId": 12345,
  "pix": null,
  "threeDSecure": null
}

Response Fields

Name Type Required Description
orderIdstringUnique identifier for the payment order.
statusstringPayment status such as "PROCESSING", "PENDING", "IN_ANALYSIS", "CONFIRMED", or "CANCELED".
cancelReasonstring | null—Machine-readable reason when status is "CANCELED", for example "INSUFFICIENT_FUNDS", "PAYMENT_PROVIDER_ERROR", or "VALIDATION_FAILED".
customerIdnumberMerchant-scoped customer identifier. Store this to skip customer registration for returning customers.
pixobject | nullPIX payment data. Present when payment method is PIX.
pix.qrCodestringPIX copy-paste code.
pix.qrCodeImagestringBase64-encoded QR code image.
threeDSecureobject | null3D Secure data. Present when card issuer requires authentication.
threeDSecure.externalResourceUrlstringURL for the 3DS authentication page.
threeDSecure.creqstring3DS challenge request token.

For card payments, the response may include a threeDSecure object if 3D Secure authentication is required by the card issuer. The SDK handles this redirect automatically when you return the response from onPaymentReady. Card retries may require 3D Secure depending on previous decline reasons.

Treat CANCELED responses as payment failures that the shopper can recover from by correcting card data, choosing another card, or choosing PIX. Provider-side card errors are returned as structured canceled responses whenever Glin can safely classify the failed attempt.

Returning customers: Store the customerId from the response. On future payments, pass it via the SDK's data.customerId or in the customerId request field to skip customer registration and compliance checks. For SDK card payments, also pass data.customer.taxId so card tokenization has the customer's CPF.

Remittance Statuses

A remittance progresses through the following statuses during its lifecycle. Terminal statuses are delivered, canceled, and expired.

created→ordering→paid→delivered
created → canceledcreated → expired
StatusDescription
createdRemittance was created. Awaiting customer payment.
orderingPayment received and exchange order is being placed.
paidCustomer payment confirmed. Funds are being processed.
deliveredFunds have been delivered to the merchant.
canceledRemittance was canceled before payment.
expiredRemittance expired before the customer completed payment.