• France
Merchant Back Office
assistance
FAQContact support
Search
Categories
Tags
English
French
English
Homepage
Use cases
Create a payment
Create an installment payment
Create a payment by Alias (Token)
Create a payment link
Create a recurring payment
Manage subscriptions
Manage your transactions (refund, cancel...)
Analyze your reports
API docs
Embedded Form
REST API
Hosted payment
Mobile payment
File exchange
Snippets
Payment methods
Plugins
Guides
Merchant Back Office
Functional guides

Initializing a single payment request

To initiate a single payment, make a call to the Web ServiceCharge/CreatePayment.

POSThttps://api.secure.osb.pf/api-payment/V4/Charge/CreatePayment

  1. Use the fields below to build your request:
    Field name Description Required
    formAction Type of desired behavior when a transaction is being created.

    Must be set to PAYMENT.

    No
    amount Amount due, expressed in the smallest currency unit. Yes
    currency Payment currency. ISO 4217 alpha-3 code. E.g.: “XPF” for CFP francs. Yes
    orderId Order reference.

    This field is recommended.

    No
    customer.email

    E-mail address that will be used for sending the payment receipt to the buyer.

    This field is recommended.

    No
    customer.reference Buyer ID on the merchant website.

    This field is recommended.

    No
    customer.billingDetails Object containing details of the billing address.

    This field and its attributes are recommended.

    No
    customer.shippingDetails Object containing the details of the billing address.

    This field and its attributes are recommended.

    No
    customer.shoppingCart Object containing the details of the shopping cart.

    This field and its attributes are recommended.

    No
    transactionOptions.cardOptions.manualValidation Payment validation mode. No
    transactionOptions.cardOptions.captureDelay Capture delay. No

     In order to obtain a more detailed description of the fields to use, test the Charge/CreatePayment Web Service using our playground.

    Example request:

    POST https://api.secure.osb.pf/api-payment/V4/Charge/CreatePayment

    {
      "amount": 10000,
      "currency": "XPF",
      "formAction": "PAYMENT",
      "orderId": "CMD012859"
      "customer": {
        "reference": "104123487",
        "email": "sample@example.com",
          "billingDetails": {
          "category": "PRIVATE",
          "firstName": "Moana",
          "lastName": "Doom",
          "phoneNumber": "49123456",
          "cellPhoneNumber": "87123456",
          "streetNumber": "",
          "address": "Rue Gauguin",
          "zipCode": "98713",
          "city": "Papeete",
          "country": "PF",
          "language": "fr"
        },
        "shoppingCart": {
          "cartItemInfo": [
            {
              "productLabel": "La Végétarienne",
              "productType": "FOOD_AND_GROCERY",
              "productRef": "ZJJ5520",
              "productQty": 1,
              "productAmount": "1273"
            }
          ]
        },
        "shippingDetails": {
          "firstName": "Moana",
          "lastName": "Doom",
          "phoneNumber": "49123456",
          "address": "Bd de la Reine Pomare IV",
          "streetNumber": "8",
          "zipCode": "98714",
          "city": "Papeete",
          "country": "PF",
          "shippingMethod": "PACKAGE_DELIVERY_COMPANY"
        }
      }
    }

  2. In response, the merchant server retrieves aformToken, an encrypted object allowing to initialize the embedded form with the transaction details and the details corresponding to the shop configuration.

    Example of a response

    {
      "webService": "Charge/CreatePayment",
      "version": "V4",
      "applicationVersion": "5.25.0",
      "status": "SUCCESS",
      "answer": {
        "formToken": "02izOLcBypiLCJWSVNBX0RFQklUIiwiVklTQV...",
        "_type": "V4/Charge/PaymentForm"
      },
      "ticket": "111a64d6eb464bb8841f1c325af503af",
      "serverDate": "2021-06-29T12:37:33+00:00",
      "applicationProvider": "OSB",
      "metadata": null,
      "mode": "TEST",
      "serverUrl": "https://api.secure.osb.pf/",
      "_type": "V4/WebService/Response"
    }
  3. Then use the formToken present in the response to display the embedded form on your payment page.
  4. Once the card details are entered, the buyer is prompted to authenticate themselves.
  5. After authentication, the gateway proceeds with the authorization request and the buyer is redirected to the success or return page.
© 2025 {'|'} All rights reserved to PayZen by OSB
25.22-1.11