Skip to main content

Documentation

Confirm Payout with FX

Confirm the exchange rate of a payout that involves foreign exchange.

Relevant when the payout was created with confirm_automatically set to false (default). To confirm creation of the payout with the FX rate included in the response to Create Payout, you must run this method within a short time. The exact amount of time varies from payout method to payout method.

This method triggers the Payout Created Webhook. This webhook contains the same information as the response.

    • payout

    • ID of the payout. String starting with payout_.

    • .NET

      • using System;
        
        namespace RapydApiRequestSample
        {
            class Program
            {
                static void Main(string[] args)
                {
                    try
                    {
                        string payout = "payout_a8f528fc070c62ae6ea2025d3fb6d041";
        
                        string result = RapydApiRequestSample.Utilities.MakeRequest("POST", $"/v1/payouts/confirm/{payout}");
        
                        Console.WriteLine(result);
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine("Error completing request: " + e.Message);
                    }
                }
            }
        }
    • JavaScript

      • const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;
        
        async function main() {
          try {
            const body = {};
            const result = await makeRequest(
              'POST',
              '/v1/payouts/confirm/payout_a8f528fc070c62ae6ea2025d3fb6d041',
              body
            );
        
            console.log(result);
          } catch (error) {
            console.error('Error completing request', error);
          }
        }
    • PHP

      • <?php
        $path = $_SERVER['DOCUMENT_ROOT'];
        $path .= "/<path-to-your-utility-file>/utilities.php";
        include($path);
        
        try {
            $object = make_request('post', '/v1/payouts/confirm/payout_a8f528fc070c62ae6ea2025d3fb6d041');
            var_dump($object);
        } catch(Exception $e) {
            echo "Error: $e";
        }
        ?>
    • Python

      • from pprint import pprint
        
        from utilities import make_request
        
        payout = 'payout_a8f528fc070c62ae6ea2025d3fb6d041'  
        results = make_request(method='post',
                               path=f'/v1/payouts/confirm/{payout}')
        pprint(results)
  • /v1/payouts/confirm/:payout

  • Confirm Payout with FX

  • curl -X post
    'https://sandboxapi.rapyd.net/v1/payouts/confirm/payout_b5f468ba37f451d846eddcdc9b2d5bcb' \
    -H 'access_key: your-access-key-here' \
    -H 'Content-Type: application/json' \
    -H 'idempotency: your-idempotency-parameter-here' \
    -H 'salt: your-random-string-here' \
    -H 'signature: your-calculated-signature-here' \
    -H 'timestamp: your-unix-timestamp-here'
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "5288ce10-b4c5-4bc1-8663-0c3ac44d6865"
        },
        "data": {
            "id": "payout_b5f468ba37f451d846eddcdc9b2d5bcb",
            "payout_type": "bank",
            "payout_method_type": "mx_abc_capital_bank",
            "amount": 2000,
            "payout_currency": "MXN",
            "sender_amount": 100.87,
            "sender_currency": "USD",
            "status": "Created",
            "sender_country": "MX",
            "sender": {
                "id": "sender_b69a49623d68889313b5b622ad9ff7a2",
                "country": "MX",
                "entity_type": "company",
                "name": "SenderCompanyName",
                "company_name": "SenderCompanyName",
                "currency": "USD"
            },
            "beneficiary_country": "MX",
            "beneficiary": {
                "id": "beneficiary_602c827876721a485cdf4a7105b05cdc",
                "last_name": "Doe",
                "first_name": "John",
                "country": "MX",
                "entity_type": "individual",
                "name": "John Doe",
                "account_number": "321654987",
                "currency": "MXN",
                "bank_account_type": "clabe"
            },
            "fx_rate": "19.8280173500",
            "instructions": [
                {
                    "name": "instructions",
                    "steps": [
                        {
                            "step1": "The funds will be transferred to the provided account details of the beneficiary ."
                        }
                    ]
                }
            ],
            "ewallets": [
                {
                    "ewallet_id": "ewallet_4f1757749b8858160274e6db49f78ff3",
                    "amount": 100.87,
                    "percent": 100
                }
            ],
            "metadata": {},
            "description": "FX with confirmation",
            "created_at": 1755758255,
            "payout_fees": null,
            "expiration": null,
            "merchant_reference_id": "",
            "paid_at": null,
            "identifier_type": null,
            "identifier_value": null,
            "error": null,
            "paid_amount": 0,
            "statement_descriptor": "RIDE MX payout monthly",
            "gc_error_code": null,
            "batch_file": null,
            "estimated_time_of_arrival": "An estimated receipt time is not yet available for this payout method.",
            "crypto_payout_hash": null
        }
    }