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
| Parameter | Type | Required? | Description |
|---|---|---|---|
amount | integer | Yes | Payment amount in the smallest currency unit (e.g., 123450 represents 1,234.50) |
currencyCode | string | Yes | Currency code in ISO 4217 alpha-3 format (e.g., UYU, USD) |
paymentType | string | Yes | Type 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 |
orderNumber | string | No | Merchant's order identifier |
installments | integer[] | No | List of installments. If not provided, takes default for each payment method configured in Merchant Portal. If not configured in Merchant Dashboard, takes 1 |
validForMinutes | integer | No | Payment link validity time, after which it cannot be processed. Default: 15 minutes. Can only be reduced, not increased |
notificationUrl | string | No | URL to notify the payment status. A default can be configured in Merchant Dashboard. |
metadataIn | object | No | Additional data specific to each country and acquirer |
MetadataIn Object
| Parameter | Type | Required? | Description |
|---|---|---|---|
metadataIn → invoiceNumber | string | No | Invoice number associated with the sale |
metadataIn → isFinalConsumer | string | No | Indicates if the sale is to a final consumer. Values: true, false |
metadataIn → taxableAmount | string | No | VAT taxable amount |
QRImageOptions Object
Parameter | Type | Required? | Description |
|---|---|---|---|
|
| No | Defines how the QR code content will be structured:
|
|
| No | Prepends the Base64 encoded payment information with this prefix. Useful for custom URL schemes in mobile apps. |
|
| No | Sets the QR code's error correction capability:
|
|
| No | Specifies the pixel format of the image:
|
|
| No | Specifies the image format: PNG, BMP, GIF, JPEG, PBM, TGA, TIFF, WEBP.
Default: |
|
| No | Width and height, in pixels, of each module of the QR code.
Default: |
|
| No | Number of border modules added to each side of the QR code image.
Default: |
|
| No | QR code color. Accepts color names or hex values. Default: "black" |
|
| No | Background color. Accepts color names or hex values. Default: "white" |
|
| No | Border color. Accepts color names or hex values. Default: Same as backgroundColor. |
|
| No | Name of a pre-loaded image in the Merchant Portal to display in the center of the QR code. |
|
| 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
paymentTypeis "QR" and must be null for any other payment type.
Updated about 8 hours ago
