Audience: All users (Merchants, Developers, Testers)
Environment: Sandbox / Production
Sometimes you want your payments to be linked to a specific customer who visited and purchased a product from your website. With Helix-Pay, this is really easy.
- Use the
POST /paymentsendpoint as usual - Send a
billing_addressproperty as part of the request body
{
"amount": 2498,
"currency": "GBP",
"description": "Order #10001",
"billing_address": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@test.com",
"phone_number": "+447975112233",
"address_line_1": "123 Queen Str.",
"address_line_2": "Apartment Block 2",
"city": "London",
"state": "London",
"zip_code": "E1 7BT",
"country_code": "GB"
}
}Here is the definition of a billing address. It is written as a Typescript interface, but it can be adapted to any programming language.
interface BillingAddress {
first_name: string;
last_name: string;
email: string;
phone_number?: string; // optional
address_line_1: string;
address_line_2?: string; // optional
city: string;
state: string;
zip_code: string;
country_code: string;
}Once you create a payment that has a billing address, you can see it in the Helix-Pay portal, as part of the payment details page.