Inject Customer

Learn how to utilize the Inject Customer endpoint in the Payment Link API to associate or update customer information for a specific payment. This includes the workflow, request parameters, and examples.

After creating a payment request, you may need to link customer information to it. The Inject Customer endpoint allows you to add or update customer data for a specific payment.

Workflow

  1. Create a Payment: Use the Create Payment Link endpoint to initiate the payment request.
  2. Obtain the paymentId: The paymentId will be included in the response to your Create Payment request.
  3. Inject Customer Information: Use the appropriate endpoint to associate the customer data with the payment.

The payment will be updated with the customer’s details, ensuring that the following payment process has access to this information.


Request URL

You must invoke a PATCH request to the following URLs based on your environment:

  • Production: https://h2h.bamboopayment.com/api/v1/payments/{paymentId}
  • Stage: https://h2h.stage.bamboopayment.com/api/v1/payments/{paymentId}

Note: Replace {paymentId} with the identifier of the payment you want to update.


Request Parameters

ParameterTypeRequired?Description
paymentIdstringYesThe unique identifier of the payment to update.
customerobjectYesObject containing the customer information to inject.

Customer Object

ParameterTypeRequired?Description
identifierstringYesUnique customer identifier (e.g., email).
emailstringNoEmail address of the customer.
firstNamestringNoFirst name of the customer.
lastNamestringNoLast name of the customer.
documentTypeIdintegerNoType of document. Review the Document types table for Uruguay
documentNumberstringNoNumber of the document.
phoneNumberstringNoCustomer’s phone number.
billingAddressobjectNoBilling address details (see Address Object).
shippingAddressobjectNoShipping address details (see Address Object).

Address Object

ParameterTypeRequired?Description
detailstringNoStreet address
countrystringNoCountry of the address.
statestringNoState or department of the address.
citystringNoCity of the address.
postalCodestringNoPostal code of the address.

Request Example

{
  "customer": {
    "identifier": "juan.perez@gmail.com",
    "email": "juan.perez@gmail.com",
    "firstName": "Juan",
    "lastName": "Pérez",
    "documentTypeId": 2,
    "documentNumber": "11211234",
    "phoneNumber": "27101234",
    "billingAddress": {
      "detail": "Rambla 1234",
      "country": "Uruguay",
      "state": "Montevideo",
      "city": "Montevideo",
      "postalCode": "11300"
    }
  }
}

Response

FieldTypeDescription
paymentIdstringThe payment ID that was updated.
redirectUrlstringURL for the next step in the payment process.
validForMinutesintegerRemaining time (in milliseconds) for the payment link.
isSuccessbooleanIndicates whether the request was successful.
errorsarrayList of validation errors, if any.

Response example

{
  "paymentId": "15d191b1-ddf7-4664-884f-e3bd99a9da79",
  "redirectUrl": "https://checkout.stage.bamboopayment.com/#?paymentId=15d191b1-ddf7-4664-884f-e3bd99a9da79",
  "validForMinutes": 10080,
  "isSuccess": true,
  "errors": []
}
footer
Last modified February 20, 2025

© Bamboo | All rights reserved 2025