The request tried to create a beneficiary for a payout, but the country was not recognized

I’m always getting this error when trying to do a payout category bank.

{"error":{"status":{"error_code":"ERROR_CREATE_BENEFICIARY","status":"ERROR","message":"The request tried to create a beneficiary for a payout, but the country was not recognized. The request was rejected. Corrective action: In the 'country' field, use the correct 2-letter ISO 3166-1 ALPHA-2 code.","response_code":"ERROR_CREATE_BENEFICIARY","operation_id":"85b6e2bf-ce6e-4c5f-a350-acea94cf7031"}}}

But my payload is correct, at least the country part:

{
  ewallet: 'ewallet_df2f34e8f8a93fcfed7fd9291ddcc9d3',
  category: 'bank',
  payout_amount: 15000,
  payout_method_type: 'us_achnonus_bank',
  sender_currency: 'USD',
  sender_country: 'US',
  beneficiary_country: 'US',
  payout_currency: 'USD',
  sender_entity_type: 'company',
  beneficiary_entity_type: 'individual',
  beneficiary: {
    first_name: 'Dom',
    last_name: 'Lup',
    account_number: '123456789',
    aba: '12345',
    country: 'US'
  },
  sender: {
    company_name: 'Final Frontier CO.',
    identification_type: 'company_registered_number',
    identification_value: '0123456789',
    phone_number: '08005555555',
    occupation: 'tourism',
    source_of_income: 'business',
    address: '17th St',
    beneficiary_relationship: 'client'
  },
  description: 'Refund from admin dashboard'
}

Why is telling me to correct the country field? US is a 2-letter ISO 3166-1 ALPHA-2.

What am I missing here?

Phone number not matching perhaps ?
Edit : Also there isn’t any “country” field, could come from the http request or there’s an error on the payload… idk the API that u use

This post was flagged by the community and is temporarily hidden.

What do you mean I’m missing USA? The country is suppose to be 2 letters

Thanks, @dlupo, it seems you may be missing a few required fields you can gather from Get Payout Required FIields type: us_achnonus_bank

Here is a request and response I got from a Create Payout request. I assume that is what you are trying to do since it includes a sender as well.

Create Payout

Request

{
  "ewallet": "ewallet_3d03be4b6ed60a217fb1faa7c01ae2ca",
  "category": "bank",
  "payout_amount": 2,
  "payout_method_type": "us_achnonus_bank",
  "sender_currency": "USD",
  "sender_country": "US",
  "beneficiary_country": "US",
  "payout_currency": "USD",
  "sender_entity_type": "company",
  "beneficiary_entity_type": "individual",
 
  "beneficiary": {
    "first_name": "Dom",
    "last_name": "Lup",
    "account_number": "123456789",
    "aba": "021000021",
    "country": "US"
     
  },
  "sender": {
    "company_name": "Final Frontier CO",
    "identification_type": "company_registered_number",
    "identification_value": "0123456789",
    "phone_number": "08005555555",
    "occupation": "tourism",
    "source_of_income": "business",
    "address": "17th St",
    "city":"San Francisco",
    "state":"CA",
    "postcode":"1234",
    "beneficiary_relationship": "friend",
    "description": "Refund from admin dashboard"
  },
  "description": "Refund from admin dashboard"
}

Response

{
    "status": {
        "error_code": "",
        "status": "SUCCESS",
        "message": "",
        "response_code": "",
        "operation_id": "98db749e-21ae-45e9-bb27-db9ef223795b"
    },
    "data": {
        "id": "payout_ee3c276a080bdd9d995bd2bf9ad353cb",
        "payout_type": "bank",
        "payout_method_type": "us_achnonus_bank",
        "amount": 2,
        "payout_currency": "USD",
        "sender_amount": 2,
        "sender_currency": "USD",
        "status": "Created",
        "sender_country": "US",
        "sender": {
            "id": "sender_6f80bc0e2fa8a39bf1eb8c2e61271099",
            "country": "US",
            "entity_type": "company",
            "address": "17th St",
            "name": "Final Frontier CO",
            "postcode": "1234",
            "city": "San Francisco",
            "state": "CA",
            "phone_number": "08005555555",
            "company_name": "Final Frontier CO",
            "currency": "USD",
            "identification_type": "company_registered_number",
            "identification_value": "0123456789",
            "beneficiary_relationship": "friend",
            "source_of_income": "business",
            "occupation": "tourism"
        },
        "beneficiary_country": "US",
        "beneficiary": {
            "id": "beneficiary_00e376d412738d97e6176e381c8d718c",
            "last_name": "Lup",
            "first_name": "Dom",
            "country": "US",
            "entity_type": "individual",
            "name": "Dom Lup",
            "account_number": "123456789",
            "currency": "USD",
            "aba": "021000021"
        },
        "fx_rate": 1,
        "instructions": [
            {
                "name": "instructions",
                "steps": [
                    {
                        "step1": "The funds will be transferred to the provided account details of the beneficiary ."
                    }
                ]
            }
        ],
        "ewallets": [
            {
                "ewallet_id": "ewallet_3d03be4b6ed60a217fb1faa7c01ae2ca",
                "amount": 2,
                "percent": 100
            }
        ],
        "metadata": {},
        "description": "Refund from admin dashboard",
        "created_at": 1658866805,
        "payout_fees": null,
        "expiration": null,
        "paid_at": null,
        "identifier_type": null,
        "identifier_value": null,
        "error": null,
        "paid_amount": 0,
        "statement_descriptor": null,
        "gc_error_code": null
    }
}

@Kyle it turns out I’m dumb, I wasn’t calling the API for payouts but the API for beneficiaries… that’s why the errors did not make sense to me. Sorry for the misunderstanding, it’s almost like programming is difficult :rofl:

1 Like