# Marketplace and Disbursement

**URL:** <https://community.rapyd.net/t/marketplace-and-disbursement/1843>\
**Category:** 🙋🏽‍♀️🙋🏽‍♂️ Ask Questions\
**Tags:** open-discussion, marketplace\
**Created:** [May 24, 2022, 8:56am UTC](https://community.rapyd.net/t/marketplace-and-disbursement/1843 "2022-05-24T08:56:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![abiieez](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/abiieez/32/1739_2.png) [@abiieez](https://community.rapyd.net/u/abiieez)\
**Post date:** [May 24, 2022, 8:56am UTC](https://community.rapyd.net/t/marketplace-and-disbursement/1843/1 "2022-05-24T08:56:16Z")

</div>

Sorry if this has been raised somewhere else but here’s my use case.

We are building a marketplace where

- creators can list their items (to make it simple lets start with USD pricing)
- creators can setup their banking details (we are starting on the South East Asia region first. So its possible that every creator only has their local bank account with the local currency: SGD / MYR / IDR / USD)
- can perform disbursement to the creator bank accounts

Lets start with a Singaporean creator has setup

- a product with USD pricing → USD 1.00
- a local bank account (SGD)

and would like to sell the product to the 3 fans from different country in the region and accept the fans local payment method (SGD / MYR / IDR)

Imagine there would be 3 fans as follows

- Fan A from Indonesia would like to pay with Rupiah → Rp 14.000
- Fan B from Malaysia would like to pay using Ringgit → RM 3
- Fan B from Singapore would like to pay using Singapore Dollar → SGD 1.4

My questions:

- Is this something doable with Rapyd ? Perhaps from the existing checkout API ?
- Can Rapyd handle the conversion from USD to Rupiah ? The idea here I want to tell Rapyd that the creator want to collect USD 1 regardless the buyer currency.

So far I only managed to integrate this to my backend but I dont see how the handle the above use cases

```auto
{
    "amount": 123.45,
    "complete_payment_url": "http://example.com/complete",
    "country": "SG",
    "currency": "USD",
    "error_payment_url": "http://example.com/error",
    "merchant_reference_id": "950ae8c6-78",
    "cardholder_preferred_currency": true,
    "language": "en",
    "metadata": {
        "merchant_defined": true
    },
    "payment_method_types_include": [
    "sg_debit_mastercard_card",
    "sg_credit_mastercard_card"
    ]
}

```

Any information is greatly appreciated

---

<div class="post-metadata">

**Author:** ![fredjinbility](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@fredjinbility](https://community.rapyd.net/u/fredjinbility)\
**Post date:** [May 24, 2022, 5:53pm UTC](https://community.rapyd.net/t/marketplace-and-disbursement/1843/2 "2022-05-24T17:53:51Z")

</div>

@abiieez Have you check Rapyd Payment With FX. [Payment With FX docs links](https://docs.rapyd.net/build-with-rapyd/docs/payment-with-fx) it might be what you are looking for

---

<div class="post-metadata">

**Author:** ![Community\_Team](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@Community\_Team](https://community.rapyd.net/u/Community_Team)\
**Post date:** [May 24, 2022, 10:58pm UTC](https://community.rapyd.net/t/marketplace-and-disbursement/1843/3 "2022-05-24T22:58:28Z")

</div>

That’s right @abiieez. Payment (above) or [Payout with FX](https://docs.rapyd.net/build-with-rapyd/docs/payout-with-fx) (Disbursement) would work. Thanks @fredjinbility

Another way this would work for some countries would be a [Wallet to Wallet](https://docs.rapyd.net/build-with-rapyd/docs/moving-funds-between-wallets) marketplace as well as accepting payments via [Virtual Accounts](https://docs.rapyd.net/build-with-rapyd/docs/bank-accounts-issuing) to deposit funds into the Wallets.

You can have multiple currencies within a wallet so yes this conversion can happen.

---

<div class="post-metadata">

**Author:** ![abiieez](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/abiieez/32/1739_2.png) [@abiieez](https://community.rapyd.net/u/abiieez)\
**Post date:** [May 25, 2022, 1:42am UTC](https://community.rapyd.net/t/marketplace-and-disbursement/1843/4 "2022-05-25T01:42:26Z")

</div>

From what I understand here the steps for

> Indonesian customer that wants to purchase USD priced product using IDR

would be something like follow (kindly correct me if I am wrong)

1. Get / Detect customer preferred currency / country
2. [Get daily rate](https://docs.rapyd.net/build-with-rapyd/reference/daily-rate-object#get-daily-rate) to get the conversion between USD to IDR
3. Construct the checkout based on the IDR currency as follows

```auto
{
    "amount": 14000,
    "complete_payment_url": "http://example.com/complete",
    "country": "ID",
    "currency": "IDR",
    "error_payment_url": "http://example.com/error",
    "merchant_reference_id": "950ae8c6-78",
    "cardholder_preferred_currency": true,
    "language": "en",
    "metadata": {
        "merchant_defined": true
    },
    "payment_method_types_include": [
    "id_ovo_ewallet",
    "id_dana_ewallet",
    "id_linkaja_ewallet"
    ]
}

```

1. Load the checkout form based on the checkout id response above.
2. As for disbursement I can use the `Payout with FX`.

Do I need to have PCI Certification t o leverage this ?

Let me know if I miss out anything obvious

---

<div class="post-metadata">

**Author:** ![Community\_Team](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@Community\_Team](https://community.rapyd.net/u/Community_Team)\
**Post date:** [May 25, 2022, 2:23am UTC](https://community.rapyd.net/t/marketplace-and-disbursement/1843/5 "2022-05-25T02:23:35Z")

</div>

Thanks @abiieez, you do need PCI Certification if you were to use [Create Payment](https://docs.rapyd.net/build-with-rapyd/reference/payment-object#create-payment) via the API.

However, you can create a [Hosted Checkout Page with FX Payment](https://docs.rapyd.net/build-with-rapyd/reference/checkout-page-object#create-checkout-page) as shown in the request & response through the link.

For disburse, you can do Create Payout with FX [Rapyd Docs | Error](https://docs.rapyd.net/build-with-rapyd/reference/payout-object#create-payout) as shown in the following example:

### Request

```auto
// Request URL: POST https://sandboxapi.rapyd.net/v1/payouts

// Message body:

{
    "beneficiary": "beneficiary_d75798c2168f04a552542880ba772966",
    "beneficiary_country": "MX",
    "beneficiary_entity_type": "individual",
    "confirm_automatically": true,
    "description": "Salary",
    "ewallet": "ewallet_6bf0e86b4c5e451691cf1f4e88b52eec",
    "sender_amount": "2000",
    "payout_currency": "MXN",
    "payout_method_type": "mx_abc_capital_bank",
    "sender": "sender_94e84ba869e20da70be5b0c0027c889d",
    "sender_country": "MX",
    "sender_currency": "USD",
    "sender_entity_type": "company",
    "statement_descriptor": "Salary-monthly-part-time",
    "metadata": {
        "merchant_defined": true
    }
}

```

### Response

```auto
{
    "status": {
        "error_code": "",
        "status": "SUCCESS",
        "message": "",
        "response_code": "",
        "operation_id": "d2d17ee4-b01f-4a3e-988c-dad113fa6639"
    },
    "data": {
        "id": "payout_caea53fe48c39c80c66a4af9b3fb9f9f",
        "payout_type": "bank",
        "payout_method_type": "mx_abc_capital_bank",
        "amount": 38511.75,
        "payout_currency": "MXN",
        "sender_amount": 2000,
        "sender_currency": "USD",
        "status": "Created",
        "sender_country": "US",
        "sender": {
            "id": "sender_94e84ba869e20da70be5b0c0027c889d",
            "country": "US",
            "entity_type": "company",
            "address": "address 2",
            "name": "Rapyd",
            "postcode": "3333",
            "city": "Amsterdam",
            "phone_number": "19019044444",
            "company_name": "Rapyd",
            "currency": "USD",
            "identification_value": "unc_num_123333",
            "province": "Amsterdam",
            "occupation": "Ridesharing"
        },
        "beneficiary_country": "MX",
        "beneficiary": {
            "id": "beneficiary_d75798c2168f04a552542880ba772966",
            "last_name": "Doe",
            "first_name": "Jane",
            "country": "MX",
            "entity_type": "individual",
            "name": "Jane Doe",
            "currency": "MXN",
            "bank_name": "Jane Doe",
            "category": "bank"
        },
        "fx_rate": 19.255873,
        "instructions": {
            "name": "instructions",
            "steps": [
                {
                    "step1": "The funds will be transferred to the provided account details of the beneficiary ."
                }
            ]
        },
        "ewallets": [
            {
                "ewallet_id": "ewallet_6bf0e86b4c5e451691cf1f4e88b52eec",
                "amount": 2000,
                "percent": 100
            }
        ],
        "metadata": {
            "merchant_defined": true
        },
        "description": "Salary",
        "created_at": 1610973615,
        "payout_fees": null,
        "expiration": null,
        "paid_at": null,
        "identifier_type": null,
        "identifier_value": null,
        "error": null,
        "paid_amount": 0,
        "statement_descriptor": "Salary-monthly-part-time"
    }
}

```

The Beneficiary can be captured on a [Hosted Beneficiary Page](https://docs.rapyd.net/build-with-rapyd/reference/beneficiary-tokenization-page-object#create-beneficiary-tokenization-page).

---

<div class="post-metadata">

**Author:** ![abiieez](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/abiieez/32/1739_2.png) [@abiieez](https://community.rapyd.net/u/abiieez)\
**Post date:** [May 25, 2022, 5:52am UTC](https://community.rapyd.net/t/marketplace-and-disbursement/1843/6 "2022-05-25T05:52:27Z")

</div>

Seems like I have to use the hosted one for now. This is my request

```auto
{
    "amount": 1,
    "complete_payment_url": "http://example.com/complete",
    "country": "ID",
    "currency": "USD",
    "requested_currency": "IDR",
    "error_payment_url": "http://example.com/error",
    "merchant_reference_id": "950ae8c6-78",
    "cardholder_preferred_currency": true,
    "language": "en",
    "metadata": {
        "merchant_defined": true
    },
    "payment_method_type_categories": [
        "card","ewallet","bank_transfer"
    ],
    "custom_elements": {
        "dynamic_currency_conversion": true
    }
}

```

And this is what I see on the screen, yet I am curios how I can do the testing on sandbox environment if I use ewallet and bank transfer.

 ![Screen Shot 2022-05-25 at 12.51.40](https://us1.discourse-cdn.com/flex016/uploads/rapyd/original/2X/4/4aabd35eed0b0ba752872005fe6277516663f193.png)
