Skip to content

Create a new Payment Link

Request

Create a shareable URL for a hosted payment page in one of two ways:

  • Payment link without quote — specify the amount, currency, expiry and payment methods inline (PaymentLink).

  • Payment link with quote — pass a quote_id from POST /quotes (with resource: payin) to bind the payment link to a quote. When supplied, the quote is the single source of truth for amount, currency, payment method, expiry and fee splits; the locked fields (amount, currency, expires_at, price_id, payment_methods, split_ids) must not be sent (CreatePaymentLinkWithQuoteRequest). When a quote_id is supplied, the payment link's expiry is set to the quote's expiry.

The request variant is selected by the presence of quote_id.

Pass split_ids to declare your share of a dynamic pricing rule's fee for this payment link. See Dynamic Fee Split. If a split on the payment link later stops resolving — Glomo deleted the underlying rule, or the rule is no longer dynamic — opening the checkout returns a 400 Bad Request, the payment link is expired, and you must issue a new one. To check complete list of API validations, click here.

Security
JWT
Bodyapplication/jsonrequired
One of:
customer_idstringrequired

The unique identifier of customer linked to payment_link.

Example:"cust_E602dMzgjpDC"
document_idstring

The unique identifier of document linked to payment_link. This document entity should contain the required documents to process incoming payments. Refer this Document entity for more details.

Example:"doc_nYUqLpuYQ0M8"
payment_methodsArray of strings

Array of payment methods that should be available for the customer on the checkout page. This field allows you to control which payment options your customers can use to complete the payment. You can specify one or multiple payment methods in the array.

Items Enum:"bank_transfer""pay_via_bank""card"
Example:
[ "card" ]
currencystring, (iso-4217)required

The currency code in ISO 4217 format. Supported currencies: USD,EUR and GBP.

Example:"USD"
amountnumber, >= 1required

The amount you want to receive, a positive integer representing the smallest currency unit. For example, if the amount is $299.00, then pass 29900 in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to represent an amount of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, for amount ¥295, pass the value as 295.

Example:1000
purpose_codestringrequired

Purpose code for why you want to receive this payment

Example:"P1401"
invoice_numberstring

Number/Id of the invoice submitted with payment_link.

Example:"RG12FF590"
invoice_descriptionstring

Description about the invoice submitted with payment_link

Example:"Payment requested for services provided"
reference_numberstring

optional identifier to be sent for reconciliations

Example:"R0001"
expires_atstring, (timestamp)required

Date when the payment_link will expire. Expiry can not be less than or equal to current date and can be upto 6 months in future.

Example:"2025-02-15T00:00:00.000Z"
invoice_amountnumber

The amount in cents for which invoice was generated. It can be more than the amount requested in this payment_link

Example:1000
notify_customerboolean

Whether to notify the customer via email when the payment link is created. Defaults to true. Set to false to suppress the notification email.

Default:true
Example:true
reminder_frequencynumber

The frequency at which you want to remind customers, valid values are 1(remind everyday), 2(remind every alternate day), 7(remind every week), 14(remind every alternate week).

Example:7
price_idstring

The unique identifier of 'Price' entity linked to the payment link. This is the referral fee for this payment link. Note: price_id is only applicable for platform businesses.

Example:"price_E602dMzgjpDC"
split_idsArray of strings(SplitIds)

The pricing splits to apply, each entry an id returned by Create a pricing split. A split fixes your share of a dynamic rule's fee and the customer bears the remainder. Omit split_ids and no dynamic rule is applied — pricing falls back to your normal (non-dynamic) rules.

split_ids and payment_methods are independent. payment_methods restricts which methods the checkout offers. split_ids only changes how the fee for a method is priced: a split applies to its own payment method whether or not that method appears in payment_methods, and a split never adds a method to the checkout or removes one from it. One checkout can therefore price one method from a dynamic split and another method from your normal rules.

Every id must exist, must belong to your business, and must still point at a live dynamic rule. When two dynamic rules share a dimension — the same payment method, subtype, rail, currency and fee type — declare a split for every one of them or the request is rejected. On payment links and orders, a split whose payment method is not enabled for your business is also rejected.

A subscription only ever charges card, or pay_via_bank when SEPA-eligible, so a split declared for any other payment method is rejected at subscription creation and on an auto debit. An auto-debit override must be declared for the method the subscription actually charges.

Glomo can configure your account to require a declaration. On such an account, a payment link, an order, a payin quote or an as_presented subscription that omits split_ids is rejected.

Example:
[ "psplit_7Kq2mXbTdLp9" ]
productobject(Product)

Details of the product that the payment is related to.

Example:
{ "name": "ShieldGuard Insurance", "description": "Flexible insurance for belongings travel and digital assets easy to manage" }
notesobject or null(Notes)

Optional key-value pairs for attaching custom metadata (e.g. invoice references, project codes). Keys must be strings and cannot collide with reserved field names. If your business has custom field rules configured (e.g. enum constraints), values are validated against those rules. Each key appears as a separate column in CSV report exports, with corresponding values populating the rows.

Example:
{ "invoice_ref": "INV-2026-001", "project": "Alpha" }
bank_account_detailsobject

Optional bank account details to associate with the customer for this payment link. When provided, the bank account will be linked to the customer and associated with this payment link. Either bic_primary or bic_secondary must be provided when including this field.

Example:
{ "account_number": "1234567890", "bic_primary": "HDFCINBBDEL", "bank_customer_id": "7189204715" }
POST
/payin
curl -i -X POST \
  https://api.glomopay.com/api/v1/payin \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "customer_id": "cust_E602dMzgjpDC",
    "document_id": "doc_nYUqLpuYQ0M8",
    "payment_methods": [
      "card"
    ],
    "currency": "USD",
    "amount": 1000,
    "purpose_code": "P1401",
    "invoice_number": "RG12FF590",
    "invoice_description": "Payment requested for services provided",
    "reference_number": "R0001",
    "expires_at": "2025-02-15T00:00:00.000Z",
    "invoice_amount": 1000,
    "notify_customer": true,
    "reminder_frequency": 7,
    "price_id": "price_E602dMzgjpDC",
    "split_ids": [
      "psplit_7Kq2mXbTdLp9"
    ],
    "product": {
      "name": "ShieldGuard Insurance",
      "description": "Flexible insurance for belongings travel and digital assets easy to manage"
    },
    "notes": {
      "invoice_ref": "INV-2026-001",
      "project": "Alpha"
    },
    "bank_account_details": {
      "account_number": "1234567890",
      "bic_primary": "HDFCINBBDEL",
      "bank_customer_id": "7189204715"
    }
  }'

Responses

Payment link created successfully

Bodyapplication/json
idstring, (string)read-only

The unique identifier for the payment link.

Example:"payin_678a4c88hpAjf"
customer_idstring

The unique identifier of customer linked to payment_link.

Example:"cust_E602dMzgjpDC"
document_idstring

The unique identifier of document linked to payment_link. This document entity should contain the required documents to process incoming payments. Refer this Document entity for more details.

Example:"doc_nYUqLpuYQ0M8"
statusstringread-only

The status of the payment_link.

Enum:"action_required""active""cancelled""expired""failed""paid""partially_paid""under_review"
Example:"success"
payment_methodsArray of stringsread-only

Array of payment methods that should be available for the customer on the checkout page. This field allows you to control which payment options your customers can use to complete the payment. You can specify one or multiple payment methods in the array.

Items Enum:"bank_transfer""card""pay_via_bank"
Example:
[ "card", "card" ]
currencystring, (iso-4217)

The currency code in ISO 4217 format. Supported currencies: USD,EUR and GBP.

Example:"USD"
amountnumber, >= 1

The amount you want to receive, a positive integer representing the smallest currency unit. For example, if the amount is $299.00, then pass 29900 in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to represent an amount of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, for amount ¥295, pass the value as 295.

Example:1000
purpose_codestring

Purpose code for why you want to receive this payment

Example:"P1401"
invoice_numberstring

Number/Id of the invoice submitted with payment_link.

Example:"RG12FF590"
invoice_descriptionstring

Description about the invoice submitted with payment_link

Example:"Payment requested for services provided"
reference_numberstring

optional identifier to be sent for reconciliations

Example:"R0001"
expires_atstring, (timestamp)

Date when the payment_link will expire. Expiry can not be less than or equal to current date and can be upto 6 months in future.

Example:"2025-02-15T00:00:00.000Z"
last_reminder_sent_atstring, (timestamp)read-only

Last time when the customer was reminded to complete the payment by visiting the link

Example:"2024-09-13T06:32:34.340Z"
invoice_amountnumber

The amount in cents for which invoice was generated. It can be more than the amount requested in this payment_link

Example:1000
notify_customerboolean

Whether to notify the customer via email when the payment link is created. Defaults to true. Set to false to suppress the notification email.

Default:true
Example:true
reminder_frequencynumber

The frequency at which you want to remind customers, valid values are 1(remind everyday), 2(remind every alternate day), 7(remind every week), 14(remind every alternate week).

Example:7
price_idstring

The unique identifier of 'Price' entity linked to the payment link. This is the referral fee for this payment link. Note: price_id is only applicable for platform businesses.

Example:"price_E602dMzgjpDC"
split_idsArray of strings(SplitIds)

The pricing splits to apply, each entry an id returned by Create a pricing split. A split fixes your share of a dynamic rule's fee and the customer bears the remainder. Omit split_ids and no dynamic rule is applied — pricing falls back to your normal (non-dynamic) rules.

split_ids and payment_methods are independent. payment_methods restricts which methods the checkout offers. split_ids only changes how the fee for a method is priced: a split applies to its own payment method whether or not that method appears in payment_methods, and a split never adds a method to the checkout or removes one from it. One checkout can therefore price one method from a dynamic split and another method from your normal rules.

Every id must exist, must belong to your business, and must still point at a live dynamic rule. When two dynamic rules share a dimension — the same payment method, subtype, rail, currency and fee type — declare a split for every one of them or the request is rejected. On payment links and orders, a split whose payment method is not enabled for your business is also rejected.

A subscription only ever charges card, or pay_via_bank when SEPA-eligible, so a split declared for any other payment method is rejected at subscription creation and on an auto debit. An auto-debit override must be declared for the method the subscription actually charges.

Glomo can configure your account to require a declaration. On such an account, a payment link, an order, a payin quote or an as_presented subscription that omits split_ids is rejected.

Example:
[ "psplit_7Kq2mXbTdLp9" ]
productobject(Product)

Details of the product that the payment is related to.

Example:
{ "name": "ShieldGuard Insurance", "description": "Flexible insurance for belongings travel and digital assets easy to manage" }
created_atstring, (timestamp)read-only

Timestamp representing when the payment_link was created

Example:"2021-06-01T12:00:00Z"
updated_atstring, (timestamp)read-only

Timestamp representing when the payment_link was last updated

Example:"2021-06-01T12:00:00Z"
notesobject or null(Notes)

Optional key-value pairs for attaching custom metadata (e.g. invoice references, project codes). Keys must be strings and cannot collide with reserved field names. If your business has custom field rules configured (e.g. enum constraints), values are validated against those rules. Each key appears as a separate column in CSV report exports, with corresponding values populating the rows.

Example:
{ "invoice_ref": "INV-2026-001", "project": "Alpha" }
bank_account_detailsobjectread-only

Optional bank account details to associate with the customer for this payment link. When provided, the bank account will be linked to the customer and associated with this payment link. Either bic_primary or bic_secondary must be provided when including this field.

Example:
{ "account_number": "1234567890", "bic_primary": "HDFCINBBDEL", "bank_customer_id": "7189204715", "bic_secondary": null }
rfi_documentsArray of objectsread-only

List of required documents for RFI (Request for Information). This field is only present when the payment link status is 'action_required', indicating that sanction screening has been triggered and additional documents are required to proceed with the payment link.

Example:
[ { "rfi_doc_id": "rfidoc_123", "name": "Passport" }, { "rfi_doc_id": "rfidoc_456", "name": "Proof of Address" } ]
Response
{ "id": "payin_678a4c88hpAjf", "customer_id": "cust_E602dMzgjpDC", "document_id": "doc_nYUqLpuYQ0M8", "status": "success", "payment_methods": [ "card" ], "currency": "USD", "amount": 1000, "purpose_code": "P1401", "invoice_number": "RG12FF590", "invoice_description": "Payment requested for services provided", "reference_number": "R0001", "expires_at": "2025-02-15T00:00:00.000Z", "last_reminder_sent_at": "2024-09-13T06:32:34.340Z", "invoice_amount": 1000, "payment_link": "https://staging-api.glomopay-eng.com/v1/payin/pl/8f31597d-e085-497a-b80f-ae97ea9422a0", "notify_customer": true, "reminder_frequency": 7, "price_id": "price_E602dMzgjpDC", "split_ids": [ "psplit_7Kq2mXbTdLp9" ], "product": { "name": "ShieldGuard Insurance", "description": "Flexible insurance for belongings travel and digital assets easy to manage" }, "created_at": "2021-06-01T12:00:00Z", "updated_at": "2021-06-01T12:00:00Z", "notes": { "invoice_ref": "INV-2026-001", "project": "Alpha" }, "bank_account_details": { "account_number": "1234567890", "bic_primary": "HDFCINBBDEL", "bank_customer_id": "7189204715", "bic_secondary": null }, "rfi_documents": [ {}, {} ] }