Skip to main content
POST
Create a hosted payment link
A payment link delegates the payment interface to iMoney Encaissement: you redirect your customer to a hosted payment page, where they choose their payment method and confirm. It is the API equivalent of the link created from the dashboard. The response returns page_url, the page to send to the payer (redirection, email, SMS, social network).
Never treat the customer’s redirection as a payment confirmation: check the state of the link on the server side, with Retrieve a payment link or a webhook, before delivering an order.
  • Authentication. Keys and the Sandbox or Live choice follow the same rules as the rest of the API: see Authentication.
  • reference. If you provide it rather than letting the API generate it, it becomes the identifier used to check the state of the link through Retrieve a payment link, an unauthenticated operation. Generate a random, high-entropy value, never a sequential or predictable order identifier. Letting the API generate it avoids this risk.
  • Redirections. Both redirect URLs must use HTTPS: an HTTP URL is rejected.
  • Expiration. A link created through the API always expires thirty minutes after its creation, whatever value is sent in shouldExpire. Send the link to your customer right away, and create a new one rather than sharing an old link again.
  • Duplicates. A second creation with the same manually provided reference fails validation (422): the reference must stay unique on your account. There is no idempotency key; no guarantee is documented for concurrent calls (to be confirmed with support). An account that is not found or inactive for the target environment returns 404.
Common error messages: Errors.

Authorizations

Authorization
string
header
required

Secret key of the Sandbox or Live account

Headers

Ipay-Target-Environment
enum<string>
required
Available options:
sandbox,
live
Ipay-Payment-Type
string
required
Allowed value: "external_payment"

Body

application/json
title
string
required
description
string
amount
integer | null
Required range: x >= 50
reference
string

Omit for automatic generation, or provide a private random value of at least 128 bits.

Minimum string length: 32
shouldExpire
boolean
default:true

The current v1 always creates an expiring link.

on_success_redirection_url
string<uri>
Pattern: ^https://
on_failed_redirection_url
string<uri>
Pattern: ^https://

Response

Link created

title
string
amount
integer | null
reference
string
status
string
Example:

"initiated"

should_expire
boolean
page_url
string<uri>