Issue a new Receiving Code
customer:beneficiaries:writePuts a new Receiving Code in force: the first one, or one replacing the code in force. The old code stops working for new senders; Beneficiaries already made with it keep working.
Requires the customer:beneficiaries:write permission. A Platform may call it for one of its End Customers with Apex-End-Customer.
ApiKeyAuthorizationBearer <API key>A Customer API key, created by a Customer admin in the Customer panel and shown once: Authorization: Bearer ak_live_… in production, ak_test_… elsewhere. A key holds a subset of its creator's permissions and may be limited to named IP addresses and an expiry date. Keys never manage people, other keys or approval rules, and never approve a Payout.
Apex-End-Customer?stringA Platform acting for one of its End Customers names it here: the request then reads and changes that End Customer's resources, under the API key's own permissions. Leave it out to act for the Platform itself. An id that is not one of the caller's End Customers answers end_customer_not_found.
uuidOK
application/json- response
account*|account is the Receiving Account, null until one is chosen.
code*|code is the Receiving Code in force, null until the Customer has one.
credit_asset*stringcredit_asset is the asset Payouts from other Customers are credited to the balance in, where the platform offers that in the Customer's country; empty where they are paid to the Receiving Account.
curl -X POST 'http://localhost:3480/v1/receiving/code'{ "account": { "account_hint": "4321", "asset": "PKR", "beneficiary_id": "8c2d5e3f-0a4b-4c9d-8e7f-6a5b4c3d2e1f", "country": "PK", "name": "Lina Qureshi" }, "code": "RC-7KQ2-M9XD", "credit_asset": "PKR"}