Create Payment Link

Create payment links and QR codes dynamically via API. Generate customizable payment URLs for transactions with options for branding and flexible configurations.

Creates a new payment request that generates a payment URL and optionally a QR code.

1. Choose the environment

You must invoke a POST request to the following URLs according to your needs:

Stage: https://h2h.stage.bamboopayment.com/api/v1/payments

Production: https://h2h.bamboopayment.com/api/v1/payments


2. Building the Request

ParameterTypeRequired?Description
amountintegerYesPayment amount in the smallest currency unit (e.g., 123450 represents 1,234.50)
currencyCodestringYesCurrency code in ISO 4217 alpha-3 format (e.g., UYU, USD)
paymentTypestringYesType of payment. Must be "QR" to enable QR code generation or "CheckoutPro" only for Payment Link. When set to "QR", the qrImageOptions object becomes optional. For any other payment type, qrImageOptions must be null
orderNumberstringNoMerchant's order identifier
installmentsinteger[]NoList of installments. If not provided, takes default for each payment method configured in Merchant Portal. If not configured in Merchant Dashboard, takes 1
validForMinutesintegerNoPayment link validity time, after which it cannot be processed. Default: 15 minutes. Can only be reduced, not increased
notificationUrlstringNoURL to notify the payment status. A default can be configured in Merchant Dashboard.
metadataInobjectNoAdditional data specific to each country and acquirer

MetadataIn Object

ParameterTypeRequired?Description
metadataIninvoiceNumberstringNoInvoice number associated with the sale
metadataInisFinalConsumerstringNoIndicates if the sale is to a final consumer. Values: true, false
metadataIntaxableAmountstringNoVAT taxable amount

QRImageOptions Object

Parameter

Type

Required?

Description

qrImageOptionscontentType

string

No

Defines how the QR code content will be structured:

  • encodedJson: Encodes payment data as Base64 JSON. This prevents QR scanners from automatically opening URLs.
  • url: Embeds the RedirectUrl directly in the QR code for easy scanning and immediate redirection. Default: encodedJson

qrImageOptionsencodedJsonPrefix

string

No

Prepends the Base64 encoded payment information with this prefix. Useful for custom URL schemes in mobile apps.

qrImageOptionserrorCorrectionLevel

string

No

Sets the QR code's error correction capability:

  • low: 7% error tolerance
  • medium: 15% error tolerance
  • quartile: 25% error tolerance
  • high: 30% error tolerance Default: quartile

qrImageOptionsimageFormat

string

No

Specifies the pixel format of the image:

  • rgb24: 8-bit RGB color (3 channels)
  • argb32: 8-bit ARGB color with alpha channel (4 channels) Default: rgb24

qrImageOptionsimagePixelFormat

string

No

Specifies the image format: PNG, BMP, GIF, JPEG, PBM, TGA, TIFF, WEBP. Default: png

qrImageOptionsscale

integer

No

Width and height, in pixels, of each module of the QR code. Default: 10

qrImageOptionsborder

integer

No

Number of border modules added to each side of the QR code image. Default: 2

qrImageOptionsforegroundColor

string

No

QR code color. Accepts color names or hex values. Default: "black"

qrImageOptionsbackgroundColor

string

No

Background color. Accepts color names or hex values. Default: "white"

qrImageOptionsborderColor

string

No

Border color. Accepts color names or hex values. Default: Same as backgroundColor.

qrImageOptionsembeddedImageName

string

No

Name of a pre-loaded image in the Merchant Portal to display in the center of the QR code.

qrImageOptionsembeddedImageRelativeWidth

float

No

Size of the embedded image relative to the QR code width. Example: 0.25 means the image will occupy 25% of the QR code width. If not specified, the image retains its original size.

Important: This object is optional when paymentType is "QR" and must be null for any other payment type.