Delegation

Create a delegated Transfer

Changed on

This endpoint allows you to make a transfer (PAY-OUT) using your own provider credentials.

post/delegated/transfers

Request

  • The document declares no server URL.
  • Auth
    none declared. Required headers: ApiKey, MerchantId, Environment

Headers

ApiKeystring required

Your api key. To create a key, please get into our dashboard. If you don't have access to it, please reach the Support team.

MerchantIdstring required

Your merchant ID. This information is available in our dashboard. If you don't have access to it, please reach the Support team.

Environment'live' | 'sandbox' required

Allow you to choose between the sandbox mode to perform some tests or the live mode for real world transactions.

Request body

referencestring required

A reference provided by the client during the creation of this Transfer, at most 255 characters

rejectionIdstring

Confirms a payout refused with 409 possible_duplicate: the rejection_id of that response. Resend the refused payout unchanged, to the same endpoint and with the same reference (the externalId, for a cross-border transaction), before the response's expires_at. A rejection confirms one payout only: resending the confirmed payout again gets the idempotent replay, while an unknown or expired rejection, one replaced by a later refusal of its confirmation, one already used by another payout, or one that refused a different payout is answered 422 invalid_duplicate_confirmation. Ignored unless duplicate protection and near-duplicate protection are both enforced for your account.

amountnumber required

Amount intended to be sent to the recipient. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge €1.00 or 100 to charge FCFA100, a zero-decimal currency).

currencystring required

Three-letter ISO currency code.

descriptionstring required

An arbitrary string attached to the Transfer. Mostly useful for displaying to user.

overrideBusinessNamestring

This field is mandatory for aggregators and allows you to override the business name displayed to the end users. This is useful if you don't want your clients to see "Hub2" as the target of their payment but your company name instead.

overrideBusinessIdstring

This field is mandatory for merchants that have the corresponding setting enabled, It allows to send a custom name

aggregatedMerchantIdstring required

Aggregated merchant id

Example request

{
  "reference": "ref_2020_11_10_001",
  "rejectionId": "ndr_V1StGXR8_Z5jdHi6B-myT",
  "amount": 100,
  "currency": "XOF",
  "destination": {
    "type": "mobile_money",
    "country": "CI",
    "provider": "orange"
  },
  "overrideBusinessName": "MyBusiness",
  "overrideBusinessId": "e9bb247c-6e3f-4a39-a539-78e3bf115994",
  "transferInformation": {
    "recipient_name_hashmac": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
    "customer_id_hashmac": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
    "transaction_purpose": "SALARY"
  }
}

Response

Idempotent replay. Duplicate protection is enforced for your account, and a payout with this reference and the same payout details already exists: it is returned as it is now, and nothing is created or charged. Only ever sent with the X-Idempotent-Replay: true header and the body field idempotentReplay: true, which is absent from a normal creation. The payout details compared are the destination type, country, beneficiary, operator, requested amount and currency; on IRT and cross-border routes, also the sender identity and, on cross-border, the rateId, unless the reference was recorded by an earlier version of this check, which compared neither; other names (recipient, bank, display name), descriptions and metadata are ignored.

idstring required

Unique identifier for the Transfer

merchantIdstring required

Identifier of the merchant owning this Transfer

createdAtstring required

Datetime in UTC timezone at which this object was created. Follows the Datetime ISO.

updatedAtstring required

Datetime in UTC timezone at which this object was updated for the last time . Follows the Datetime ISO.

referencestring required

A reference provided by the client during the creation of this Transfer

descriptionstring required

An arbitrary string attached to the Transfer. Mostly useful for displaying to user.

status'created' | 'successful' | 'pending' | 'failed' required

The current status of this Transfer

amountnumber required

Amount intended to be sent to the recipient. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge €1.00 or 100 to charge FCFA100, a zero-decimal currency).

currencystring required

Three-letter ISO currency code.

mode'live' | 'sandbox' required

Mode in which this transfer exists. The sandbox mode can be used during the integration phase and is available as soon as the merchant account is created. No real transactions are made in this mode. The live mode has to be used to make real transactions.

overrideBusinessNamestring

override business name for aggregator

overrideBusinessIdstring

override business id for merchant

isIrtboolean required

indicate if the transfer was international

providerReferencestring required

provider reference that identify this transfer

isDelegatedboolean required

Indicates if the transfer is delegated

aggregatedMerchantIdstring required

Aggregated merchant id

subMerchantIdstring

Submerchant ID

idempotentReplaytrue

Present, and true, only when the response replays an existing payout (idempotent replay, HTTP 200 with the X-Idempotent-Replay: true header). Absent when the transfer has just been created.

balanceBeforenumber

Computed balance before the transfer is executed.

balanceAfternumber

Real available balance right after the transfer is executed.

Example response

{
  "id": "tr_z1urYtVFgEebtcj8fxp4v",
  "createdAt": "2020-10-15T12:09:49.355Z",
  "updatedAt": "2020-10-15T12:16:26.128Z",
  "reference": "ref_2020_11_10_001",
  "status": "successful",
  "amount": 100,
  "currency": "XOF",
  "mode": "live",
  "destination": {
    "type": "mobile_money",
    "country": "CI",
    "provider": "orange"
  },
  "fees": [
    {
      "id": "lAe5HnFpvOjwdT9vSIgPA",
      "amount": 5,
      "currency": "XOF"
    }
  ],
  "subMerchantId": "submerchant_123",
  "transferInformation": {
    "recipient_name_hashmac": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
    "customer_id_hashmac": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
    "transaction_purpose": "SALARY"
  },
  "idempotentReplay": true,
  "duplicateConfirmation": {
    "rejectionId": "ndr_V1StGXR8_Z5jdHi6B-myT"
  }
}

Changes

    • breaking

      added the pattern ^[0-9a-fA-F]{64}$ to the request property /////

    • breaking

      added the pattern ^[0-9a-fA-F]{64}$ to the request property /////

    • breaking

      the ///// response property's maxLength was increased from 50 to 64 for the response status

    • breaking

      the ///// response property's maxLength was increased from 50 to 64 for the response status

    • breaking

      added to the response property oneOf list for the response status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • warning

      the request property's maxLength was set to 255

    • warning

      removed the request property /////

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property ///// from the response with the status

    • warning

      added the new 400.00 enum value to the response property for the response status

    • warning

      added the new instant_payment enum value to the ///// response property for the response status

    • warning

      added the new instant_payment enum value to the ///// response property for the response status

    • warning

      added the new instant_payment enum value to the ///// response property for the response status

    • info

      added the new optional request property

    • info

      added bank_transfer mobile_money airtime instant_payment discriminator mapping keys to the request property

    • info

      added the new instant_payment enum value to the request property /////

    • info

      added the new instant_payment enum value to the request property /////

    • info

      added the new instant_payment enum value to the request property /////

    • info

      the ///// request property's maxLength was increased from 50 to 64

    • info

      the ///// request property's maxLength was increased from 50 to 64

    • info

      added to the request property oneOf list

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added bank_transfer mobile_money airtime instant_payment discriminator mapping keys to the response property for the response status

    • info

      removed the unsupported_action enum value from the response property for the response status

    • info

      the ///// response's property pattern ^[0-9a-fA-F]{64}$ was added for the status

    • info

      the ///// response's property pattern ^[0-9a-fA-F]{64}$ was added for the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the success response with the status