Create a payout

Request

Creates a payout for either Rebilly-originated (exposure) payments by using the Rebilly FinancialAccountID or the MGS CardID. Alternatively, you can create any non-exposure payouts by supplying the gateway account ID or payment instrument required to complete the payout.

This API is stable and Rebilly plans to extend it with additional types of payment instruments.

Rebilly creates the customer if it does not exist.

Security
ApiKey
Path
OrderIDstringrequired

ID of the resource.

Headers
Organization-Idstring

Unique organization identifier. The gaming server ID maps to an organization in Rebilly. If this value is not set, the default user gaming server is used.

Bodyapplication/jsonrequired

Payout resource.

PaymentInstrumentPaymentInstrumentGeneric (object) or PaymentInstrumentMGSCardID (object) or PaymentInstrumentBankAccount (object) or PaymentInstrumentInteracETransfer (object)required
One of:

Details pf the payment instrument used to make the payout.

DOBstring, (date)

Player's date of birth in ISO 8601 full-date format (yyyy-mm-dd).

IpAddressstring, (ipv4)

IPv4 address in dotted decimal format.

Example:"127.0.0.1"
Emailstring, (email)

Player's email address. The email must match an email regex, and also be at a domain with a valid MX record. Rebilly does not send any emails.

Example:"user@example.com"
FirstNamestring, [ 3 .. 45 ] characters

Player's first name.

Example:"Arnold"
LastNamestring, [ 3 .. 45 ] characters

Player's last name.

Example:"Schwartzenegger"
Addressstring, <= 60 characters

Player's street address.

Example:"31 Guild Street"
Address2string, <= 60 characters

Player's second line of street address.

Example:"Apartment 2"
Citystring, <= 45 characters

Player's city.

Example:"London"
Regionstring, <= 45 characters

Player's state, province, territory, parish, or region.

Example:"Westminster"
Countrystring, (ISO-3166-1-alpha-2), <= 2 characters

Player's country in ISO 3166-1 alpha-2 format.

Example:"GB"
PostalCodestring, <= 10 characters

Player's postal code, also known as the post code or zip code.

Example:"E8 6XD"
PhoneNumberstring, <= 20 characters

Player's telephone number, which may be either a landline or mobile.

Example:"077 8826 0192"
PayoutExportReferencestring, <= 50 characters(ResourceId)required

Payout identifier, also known as the payment export reference. This must be unique for the merchant within a 24-hour period, to prevent duplicate requests.

Example:"22_4567899"
GatewayAccountIDstring

ID of the merchant account to be used for the payout.

Example:"rebilly_001"
CasinoIDstring, <= 50 characters(ResourceId)required

ID of the casino. This value maps to a website ID in Rebilly.

Example:"22"
PlayerIDstring, <= 50 characters(ResourceId)required

ID of the player. This value maps to a customer in Rebilly. It is composed of two parts concatenated by an underscore. The first part is the registration casino ID, and the second part is the user ID.

Example:"22_112233"
OrderCurrencystring, (ISO-4217-alpha-3)required

Three character ISO 4217 alpha-3 code. This value must be configured in the gateway account.

Example:"USD"
OrderAmountstringrequired

Payment amount with no currency symbol.

Example:"45.00"
NotificationURLstring, (url)required

For offsite payments that require third-party verification, this URL is called by the system when the payment returns from the offsite process.

If the transaction times out or an other exceptional type of transaction occurs, this URL is used to update when the result changes from unknown to another value.

ExtraDataobject

Extra data list as a map {"field name": "custom value", ...}.

The format must follow the saved format. Recommended fields are BannerTagId, RegistrationDate, and DeviceFingerprint. If a global or master user ID is available, that would be appropriate too.

Example:
{ "BannerTagId": "123|456|789|098|765|543|210", "RegistrationDate": "2017-03-23", "DeviceFingerprint": "23932819301914985" }
curl -i -X PUT \
  'https://www.rebilly.com/_mock/mgs-api-definitions/mgs-api/pay-outs/{OrderID}' \
  -H 'Content-Type: application/json' \
  -H 'Organization-Id: string' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE' \
  -d '{
    "PaymentInstrument": {
      "PayoutMethod": "Alipay",
      "FinancialAccountID": "adam@rebilly.com"
    },
    "DOB": "2019-08-24",
    "IpAddress": "127.0.0.1",
    "Email": "user@example.com",
    "FirstName": "Arnold",
    "LastName": "Schwartzenegger",
    "Address": "31 Guild Street",
    "Address2": "Apartment 2",
    "City": "London",
    "Region": "Westminster",
    "Country": "GB",
    "PostalCode": "E8 6XD",
    "PhoneNumber": "077 8826 0192",
    "PayoutExportReference": "22_4567899",
    "GatewayAccountID": "rebilly_001",
    "CasinoID": "22",
    "PlayerID": "22_112233",
    "OrderCurrency": "USD",
    "OrderAmount": "45.00",
    "NotificationURL": "string",
    "ExtraData": {
      "BannerTagId": "123|456|789|098|765|543|210",
      "RegistrationDate": "2017-03-23",
      "DeviceFingerprint": "23932819301914985"
    }
  }'

Responses

Payout created.

Bodyapplication/json
PayoutMethodstring(AlternativeMethod)required

Name of the alternative method. The value supplied here determines where the payment is routed.

Enum:"Alipay""Aircash""Airpay""AstroPay Card""AstroPay-GO""bank-transfer""bank-transfer-2""bank-transfer-3""bank-transfer-4""bank-transfer-5"
CardIDstring

ID of the card. This ID maps to a payment card in Rebilly. This field is required when the payout method is payment-card. For test cards, see Test cards.

Example:"411111"
FinancialAccountIDstring

ID of the account to be paid. This field is required when the payout method is alternative.

Example:"123-456-789-abc-ef1-234-567"
TransactionIDstring, <= 50 characters(ResourceId)read-only

ID of the transaction. This value is unique for the merchant in Rebilly. Rebilly attempts to use the PayoutExportReference value, but if the value is not unique, a variation is generated.

Example:"22_4567899"
PayoutExportReferencestring, <= 50 characters(ResourceId)required

Payout identifier, also known as the payment export reference. To prevent duplicates, this value must be unique for the merchant within a 24-hour period.

Example:"22_4567899"
GatewayAccountIDstringrequired

ID of the merchant account to be used for the payout.

Example:"rebilly_001"
CasinoIDstring, <= 50 characters(ResourceId)required

ID of the casino. This value maps to a website ID in Rebilly.

Example:"22"
GSIDstring, <= 50 characters(ResourceId)read-only

ID of the gaming server. This value maps to an organization ID in Rebilly.

Example:"45"
PlayerIDstring, <= 50 characters(ResourceId)required

ID of the player. This value maps to a customer in Rebilly. It is composed of two parts concatenated by an underscore. The first part is the registration casino ID, and the second part is the user ID.

Example:"22_112233"
OrderCurrencystring, (ISO-4217-alpha-3)required

Three character ISO 4217 alpha-3 code. This value must be configured in the gateway account.

Example:"USD"
OrderAmountstringrequired

Payment amount with no currency symbol. It is important to check the PurchaseAmount, which may be different from the OrderAmount if the player changed the order mid-process, which could be due to an upsell or bump scenario.

Example:"45.00"
BillingCurrencystring, (ISO-4217-alpha-3)read-only

Three character ISO 4217 alpha-3 code. When dynamic currency conversion occurs, this is the currency paid out.

Example:"USD"
BillingAmountstringread-only

Amount billed. When dynamic currency conversion occurs, this is the amount of the currency paid out.

Example:"45.00"
BillingDescriptorstringread-only

Billing descriptor that is displayed on the cardholder's billing statement.

Example:"My descriptor"
NotificationURLstring, (url)required

For offsite payments that require third-party verification, this URL is called by the system when the payment returns from the offsite process.

If the transaction times out or an other exceptional type of transaction occurs, this URL is used to update when the result changes from unknown to another value.

ExtraDataobject

Extra data list as a map {"field name": "custom value", ...}.

The format must follow the saved format. Recommended fields are BannerTagId, RegistrationDate, and DeviceFingerprint. If a global or master user ID is available, that would be appropriate too.

To test within the sandbox, use these magic values to simulate different outcomes with DesiredResult as the key:

Magic valueDescription
approvedTransaction with an approved result and completed status.
declinedTransaction with a declined result and completed status.
timeout-approvedTransaction with a timeout status and an unknown result. After approximately 5 minutes, the timeout becomes resolved and has an approved result with a completed status.
timeout-declinedTransaction with a timeout status and an unknown result. After approximately 5 minutes, the timeout becomes resolved and has a declined result and a completed status.
conn-error-declinedTransaction with a conn-error status and an unknown result. After approximately 5 minutes, it resolves and becomes result declined and status completed.
sending-declinedTransaction with a sending status and an unknown result. After 5 minutes, it resolves and becomes declined or completed.
pending-approvedTransaction with a pending status and an unknown result. After 5 minutes, it resolves to approved or completed.
Example:
{ "BannerTagId": "123|456|789|098|765|543|210", "RegistrationDate": "2017-03-23", "DeviceFingerprint": "23932819301914985", "DesiredResult": "approved" }
Statusstringread-only

Status of the payout. Some status values require special handling, such as:

  • timeout (or conn-error): Rebilly polls the gateway to determine if the payout is processed. The payout should be held open until a determination is made. Rebilly sends a notification to the NotificationURL upon resolution of the timeout and conn-error states.
  • waiting-gateway: Rebilly polls final status and sends a notification to NotificationURL when the payout is completed.
Enum:"pending""sending""timeout""conn-error""never-sent""completed""waiting-gateway"
Example:"completed"
Resultstringread-only

Result of the payout. A result of unknown means the payout should be held open or pending for future changes. This may happen because of a timeout or because interaction is necessary for further processing.

Enum:"approved""declined""canceled""abandoned""unknown"
Acquirerstringread-only

Acquirer used for the payment.

Example:"Natwest"
ResponseCodestringread-only

Code that maps to a message. The code is a string number between 0 and 1000. For more information, see Rebilly response codes.

Example:"00"
ResponseMessagestringread-only

Message mapped from the response code.

Example:"Successful approval"
ResponseCodeGatewaystringread-only

Response code from the downstream gateway.

Example:"00"
ResponseMessageGatewaystringread-only

Message mapped from the response code from the gateway.

Example:"Approved transaction"
GatewayTransactionIDstringread-only

Transaction identifier from the processor or gateway.

Example:"11111-22222-33333-44444"
CreatedTimestring, (date-time)(ServerTimestamp)read-only

Date and time when the payout is created.

UpdatedTimestring, (date-time)(ServerTimestamp)read-only

Date and time when the payout is updated.

Response
{ "PayoutMethod": "Alipay", "CardID": "411111", "FinancialAccountID": "123-456-789-abc-ef1-234-567", "TransactionID": "22_4567899", "PayoutExportReference": "22_4567899", "GatewayAccountID": "rebilly_001", "CasinoID": "22", "GSID": "45", "PlayerID": "22_112233", "OrderCurrency": "USD", "OrderAmount": "45.00", "BillingCurrency": "USD", "BillingAmount": "45.00", "BillingDescriptor": "My descriptor", "NotificationURL": "string", "ExtraData": { "BannerTagId": "123|456|789|098|765|543|210", "RegistrationDate": "2017-03-23", "DeviceFingerprint": "23932819301914985", "DesiredResult": "approved" }, "Status": "completed", "Result": "approved", "Acquirer": "Natwest", "ResponseCode": "00", "ResponseMessage": "Successful approval", "ResponseCodeGateway": "00", "ResponseMessageGateway": "Approved transaction", "GatewayTransactionID": "11111-22222-33333-44444", "CreatedTime": "2019-08-24T14:15:22Z", "UpdatedTime": "2019-08-24T14:15:22Z", "_links": [ { … } ] }